texts: How to show full product page on home (but show different custom block than product page)

texts:
I have a one product store in Magento 2, and want to make it easy to order as soon as possible.
So i want to have on the homepage everything that there is on the product page, like order button, quantity, reviews etc, an exact copy of the product page.

(The product widget is not enough, because that way you cant order directly from the homepage with quantity etc and there is missing a lot of information)

The best thing to do is, make the product page the homepage by setting the product url as home.
But... i want to have a custom block on the homepage above the product with a slider.
That is ofcourse possible, but then i don't want that slider on the "original" product page.
This way i also have besides the homepage, the normal product page where customers can order the product.

I hope that my question makes sense.
As you hopefully understand i am looking to include the full product page into my homepage, or find a way to show a custom block only on the homepage (but that will be the product page) and not on the product page itself.

Thanks for helping out!

Edit:

Maybe this is a better way for asking.
If I can set a block to show only on homepage, i can achieve what i want.
So i have set Default Web URL to catalog/product/view/id/1 to show the full product page on home.
Now i want to show a block on the homepage, but not on the productpage if i would visit that page itself.
I tried to edit cms_index_index.xml but (ofcourse) it only works on cms pages and not when you set product page as home.


texts: How to fix an admin link created from a shell script?

texts:
I am creating a link to a specific action in the admin section which will be emailed.

The task is run in a shell script called rules.php.

So I generate the admin url with:

Mage::helper("adminhtml")->getUrl("productmodule/adminhtml_trace/download", array('csv' => $filename));

When running the script from command line:

php -f rules.php apply

The generated url is:

https://mysite.dev/rules.php/productmodule/adminhtml_trace/download/csv/file_1/key/3f5f888f5b6f191ab32e496f7e2bafd8/

Where I want the url to be:

https://mysite.dev/index.php/productmodule/adminhtml_trace/download/csv/file_1/key/3f5f888f5b6f191ab32e496f7e2bafd8/


texts: So I've setup a 'discontinued' attribute in Magento 2. I plan to use this to set a badge on the product to let customers know if a product is discontinued. I was able to create the attribute and load some products with this attribute to 'Yes'. The problem is that this attribute is now a selectable option on the product page. I was pretty sure it was possible to create an attribute for back end use only but have been all through the admin pages and done some research an haven't been able to locate an option for this. Any ideas?


texts: How to update datatype for column in custom module?

texts:
I've InstallSchemathat created one table that's worked fine, but later on somehow scope changed and now need to change one specific column's datatype.
I tried with UpgradeSchema but doesn't seems to work.
Any idea to implement this ?
I know I can change via deleting existing table but I'm working on git setup so....
app/code/Vendor/Module/etc/module.xml:
<module name="Vendor_Module" setup_version="1.0.4" schema_version="1.0.4"/>

app/code/Vendor/Module/Setup/UpgradeSchema.php:
class UpgradeSchema implements UpgradeSchemaInterface
{

    /**
     * {@inheritdoc}
     */
    public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        if (version_compare($context->getVersion(), '1.0.4') < 0) {
            $connection = $setup->getConnection();
            $connection->addColumn(
                $setup->getTable('one_table'),
                'serial_number',
                [
                    'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
                    'length' => 255,
                    'nullable' => true,
                    'default' => '',
                    'comment' => 'Serial Number'
                ]
            );
        }
    }
}

app/code/Vendor/Module/Setup/InstallSchema.php:.
->addColumn(
                'serial_number',
                \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER,
                255,
                ['nullable => false'],
                'Serial Number'
            )


texts: Magento 2 : Overide Magento\Catalog\Block\Product\View\Gallery Block

texts:
I am working on custom extension and need to override Magento\Catalog\Block\Product\View\Gallery block.

I have followed this method.

In di.xml,

<preference for="Magento\Catalog\Block\Product\View\Gallery" type="[Company]\[Vendor]\Block\Catalog\Product\View\Gallery"/>

In [Company][Vendor]\Block\Catalog\Product\View\Gallery.php

namespace [Company]\[Vendor]\Block\Catalog\Product\View;

class Gallery extends \Magento\Catalog\Block\Product\View\Gallery
{

public function getGalleryImagesJson()
   {

        $imagesItems = [];
        foreach ($this->getGalleryImages() as $image) {
            $imagesItems[] = [
                'thumb' => $image->getData('small_image_url'),
                'img' => $image->getData('medium_image_url'),
                'full' => $image->getData('large_image_url'),
                'caption' => $image->getLabel(),
                'position' => $image->getPosition(),
                'isMain' => $this->isMainImage($image),
            ];
        }
        if (empty($imagesItems)) {
            $imagesItems[] = [
                'thumb' => $this->_imageHelper->getDefaultPlaceholderUrl('thumbnail'),
                'img' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
                'full' => $this->_imageHelper->getDefaultPlaceholderUrl('image'),
                'caption' => '',
                'position' => '0',
                'isMain' => true,
            ];
        }
     return json_encode($imagesItems);
    }
}

When I do this, More Views Images of the product is don't show any more.

Can you help me into this?

Thanks in advance.


texts:
In Magento 2.3.4, frequently Products are being disappeared from listing page and upon next refresh it works. I checked all possible cases but failed to find out the root cause.
Can some share the possible reason / solution for it?


texts: Create Shipping Labels Error - UPS - Magento 2.2.4

texts:
I am trying to create shipping labels through admin->sales->orders->ship

When I select an order, check the "Create Shipping Label" option and then submit shipment is opens a page where I can create packages and add products to the package.

After I have entered the information and click Save I get the following error:

"We don't have enough information to create shipping labels. Please make sure your store information and settings are complete."

I have entered my username, password, access key, and shipper number in the UPS settings under admin->stores->config->shipping-methods.

Is there a way to figure out whats missing or causing the error?

Update

If I go to: https://www.ups.com/upsdeveloperkit/manageaccesskeys?loc=en_US

and enter my access key, I get the following table:

DEVELOPER RESOURCE                                          ACCESS TYPE

Address Validation - City, State, ZIP                       Production
Address Validation - Street Level                           Production
Dangerous Goods - Package                                   Production
Locator - Package                                           Production
Paperless Document                                          Production
Pickup - Ground Freight                                     Test
Pickup - Package                                            Production
Pre-Notification - Package                                  Production
Quantum View - Package                                      Production
Rating - Ground Freight                                     Test
Rating - Package                                            Production
Shipping - Ground Freight                                   Test
Shipping - Package                                          Production
Time In Transit - Package                                   Production
Tracking - Package, Ground Freight, and Air Freight         Production
UPS Signature Tracking - Package                            Production
UPS TradeAbility - Package                                  Production

In the shipping settings for ups in magento I have tried setting Live mode to both yes and no but same results


texts: JS error on product page Cannot read property '' of undefined _getAttributeCodeById which doesnt allow to load configrable price and image

texts:
I am getting an error due to which I am not able to get the configurable product price and image being reflected and this error shows when I click on swatch color options.

Below is the image of the error which I am facing.

Please help me solve this issue


texts: Does initializing a helper variable before using it multiple times benefits performance?

texts:
I wonder if it is better to write:

    $lesser2000 = Mage::helper('wr_epo')->getFensterbankTill2000mm($quote);
    $higher2000 = Mage::helper('wr_epo')->getFensterbankHigherThen2000mm($quote);
    $lesser3000 = Mage::helper('wr_epo')->getFensterbankTill3000mm($quote);
    $higher3000 = Mage::helper('wr_epo')->getFensterbankHigherThen3000mm($quote);
    $sumFensterbank = Mage::helper('wr_epo')->getFensterbankTotal($quote);
    $totalCartWeight = Mage::helper('wr_epo')->getFensterbankTotalWeight($quote);

or:

    $wrEpo = Mage::helper('wr_epo')

    $lesser2000 = $wrEpo->getFensterbankTill2000mm($quote);
    $higher2000 = $wrEpo->getFensterbankHigherThen2000mm($quote);
    $lesser3000 = $wrEpo->getFensterbankTill3000mm($quote);
    $higher3000 = $wrEpo->getFensterbankHigherThen3000mm($quote);
    $sumFensterbank = $wrEpo->getFensterbankTotal($quote);
    $totalCartWeight = $wrEpo->getFensterbankTotalWeight($quote);

Which is better for performance? Or does it make no difference?


texts: Attribute scope is disabled. How can I change it?

texts:
I want to translate the attribute SKU in product detail pages. I've set the default label to Artikelnummer (NL) and translated the label under Manage Labels.

Still... in customer view it only shows the dutch language in different store views. Therefore I want to change the scope to STORE. As you see in the image below, that option is disabled.

How do I get the translations under Manage Labels to show in different store views?


texts: VAT Validation using EU VIES service not working

texts:
The VAT validation on our Magento 1 install stopped working. Annoying, because we have quite a few foreign customers who like the fact that they do not have to pay VAT on our site.
The feature worked for years, but stopped working.
In the system.log I see message like this:
ERR (3): Warning: SoapClient::SoapClient(http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known  in /public_html/app/code/core/Mage/Customer/Helper/Data.php on line 619
2020-12-02T21:23:30+00:00 ERR (3): Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://ec.europa.eu/taxation_customs/vies/services/checkVatService?wsdl"  in /public_html/app/code/core/Mage/Customer/Helper/Data.php on line 619


texts: Where is the "Add product" tab in Magento 2

texts: Trying to add product manually for an existing customer, but the orange tab is no longer there.


texts: What is the correct way to show a Currency Symbol or Text across all prices shown in the store, cart and checkout?

texts:
Show a Currency Symbol or Text across all prices

  For example to show NZD after each $XXX.YY so it would display as
  $XXX.YY NZD

This is to be shown on Product pages, cart, checkout.

Is there a single setting for this, or do we have to tediously make a bunch of plugin interceptors and template edits (I have done just that in the past)?

I feel that this sort of thing should just be a built in feature of Magento 2 and I want to avoid re-inventing the wheel if there is a correct way to do this.

Magento 2.3+

Kind regards,
Liam

Edit: If you are implementing something like this for a Bank to let you use them with another payment gateway e.g. they give a Merchant ID to the third party gateway. Just ask if you can simply put a line of text on the order summary stating "All prices are in NZD." So much easier....


texts: Magento: Paypal Express checkout button not working

texts:
Hope I can get some help. It seems the Paypal Express checkout is broken on a Magento store. Anytime you click on "Checkout with Paypal Express" it just reloads the shopping cart page, doesn't go to paypal's checkout like it should. And another strange thing I notice, when I go into System>Configuration>Payment Methods the "Configure" button for "Paypal Express" is grayed out and not clickable. The only way I can make it clickable is if I inspect the HTML code and change "disabled" to "enabled" in the button element.

Thanks in advance


texts: Product Data Transfer in Store Magento2.3.2

texts:
Currently in My Site I have 2 Store

Store 1
Store 2

I Want copy Data "Store 2" to "Store 1"

Any help would be greatly appreciated.


texts: Magento2 - Default datetime value add column

texts:
I'm using magento Magento2.3.4, I tried to add new column with datetime type and default value of current datetime like this:

$columns['created_time'] = [
                             'type' => \Magento\Framework\DB\Ddl\Table::TYPE_DATETIME,
                             'nullable' => true,
                             'comment' => 'Created Time',
                             'default' => \Magento\Framework\DB\Ddl\Table::TIMESTAMP_INIT
                           ];

but i always got an error:

  SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid
  default value for 'created_time'


texts: How to insert specific invoice items in sales_invoice_item Table?

texts:
Actually, I created a multi-vendor site. I did most of the things but now am stuck in invoice creation.
I filter the invoice items in the New Invoice page shown in the screenshot

In this order, there are 4 Items but I already filter each vendor can see own items.
In this screenshort, you can see 2 items because the current login vendor has 2 items in this order.

My Problem is when I click on "submit invoice" button in this page it creates 4 records mean insert 4 items in sales_invoice_item table. I want to insert just those records that shown in New Invoice Page which I filtered .
 Others invoice item will be excluded.

How can I make restriction? please guide me. Thanks


texts: How to add configurable product to category without including simple products?

texts:
When I assign a configurable product to a category, all of its simple products are also assigned to the same category. The product list view will display only the base configurable products (as desired). But the layered navigation's product count will include the simple products.

As a result, the number of products displayed in the list view does not match the product count shown in the layered navigation.

Is it possible to add a configurable product to a category, without including the simple products? For now, I've been manually removing the simple products from each category, but this won't scale as more products are added.

Update

I attempted two tests based on the feedback from Alex and Pmclain. I still ran into the issues where either the layered nav product count is incorrect, or the configurable product doesn't show up at all. Any suggestions?

Creating a product with "not visible individually"

RESULT

Configurable and simple products are set to not visible individually
Configurable product associated with the category
Configurable product does not appear in product list because visibility is set to not visible individually.

Creating a product with visibility set to catalog,search

RESULT

Configurable product's visibility is set to catalog,search
Simple products visibility set to not visible individually
Configurable product shows up in the product list, and simple products do not appear (which is good).
Layered navigation count still includes simple products.


texts: 1 platform with 2 different type of user accounts with different roles

texts:
I will try to explain my problem, excuse me for my English but i'm Italian.

OK, my client want an e-commerce website with dual functionality.

Sell products to regular customers
Sell products to retailers

Simply put two different types of users

For example, the same product with different prices:

Costumer price: 10 $
Retail price: 5 $

Can i do it whit Magento? Is it preferable to use one platform or use two different platforms?

thanks...


texts: Add delivery destination by city and apply a special price each city

texts: I'm working on Magento 2, at checkout, I want to add a drop-down list to select cities for delivery and apply a special price for each city, the total amount should be updated according to the shipping cost for each destination.


texts: Magento not sending order emails for third party payment gateway

texts:
Order Emails is not working only for particular payment gateway Eway.
Emails trigger for Bank deposit & Paypal but eway payment gateway doesn't work.
success.phtml, getCanViewOrder() is false in Eway orders but true in case of others.


texts:
In magento 2.2.7, Authorize.net payment throwing below error while clicking place order,
in live mode - Error getting valid response from api. Check log file for error details and in sandbox mode - User authentication failed due to invalid authentication values. (I have verified the sandbox credentials).
on further debug, I found below error is throwing on live mode
the input data of type "boolean" did not convert to an array, but got a result of type "boolean"
We are using https://marketplace.magento.com/authorizenet-magento-module-authorizenet.html module.
Can anyone help me on this. Thanks.


texts: How to Create Weight Based Shipping Rule

texts:
Right now I am using Flat Shipping rates. I want to implement below rule

up to 500gms - INR 100
501 to 1000gms - INR 50
1001 to 1500gms -INR 200
1501 to 2000gms - INR 250 and so on...

Is there any way to set this rule ?


texts: simple Controller not working with Magento2

texts:
Trying to follow this https://www.mageplaza.com/magento-2-module-development/ to create a module, but nothing is working for me.
I am using Magento with xampp.

My root folder name is Magento2

path: C:\xampp\htdocs\Magento2\app\code\Mageplaza

created: HelloWorld folder

  C:\xampp\htdocs\Magento2\app\code\Mageplaza\HelloWorld

Controller folder
etc folder
registration.php

registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Mageplaza_HelloWorld',
    __DIR__
);

Inside etc folder:

frontend folder

module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Mageplaza_HelloWorld" setup_version="2.0.0" />
</config>

Inside frontend folder

routes.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="mageplaza" frontName="helloworld">
            <module name="Mageplaza_HelloWorld" />
        </route>
    </router>
</config>

Inside Controller folder:

Index folder

Inside Index folder:

Display.php

<?php
namespace Mageplaza\HelloWorld\Controller\Index;

class Display extends \Magento\Framework\App\Action\Action
{
  public function __construct(\Magento\Framework\App\Action\Context $context)
  {
    return parent::__construct($context);
  }

  public function execute()
  {
    echo 'Hello World';
    exit;
  }
}

url: http://localhost/Magento2/helloworld/index/display
result: 404

Any idea where I am going wrong, just started learning magneto2.


texts: Magento2 - Extend Magento Block class in custom module

texts:
Basically, I want to use some additional functionality in the layered navigation file Magento_LayeredNavigation::layer/view.phtml file for that using Objectmanager my code works fine. (Also I don't want to use preference Or helper)

so,

I trying to extend the Magento\LayeredNavigation\Block\Navigation file in my custom module Block file so I can use default function as well as my custom block functions.
I did as per Below,

namespace Vendor\Module\Block;

class Filter extends \Magento\LayeredNavigation\Block\Navigation
{

    public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Magento\Catalog\Model\Layer\Resolver $layerResolver,
        \Magento\Catalog\Model\Layer\FilterList $filterList,
        \Magento\Catalog\Model\Layer\AvailabilityFlagInterface $visibilityFlag,
        array $data = []
    ) {
        parent::__construct($context, $layerResolver, $filterList, $visibilityFlag, $data);
    }

Phtml file override in catalog_category_view.xml

<referenceContainer name="category.product.list.additional">
            <block class="Vendor\Module\Block\Filter" name="custom.filter.view" template="Vendor_Module::view.phtml"></block>
</referenceContainer>

but it throws error.

Fatal error: Uncaught Error: Cannot instantiate interface Magento\Catalog\Model\Layer\FilterableAttributeListInterface in D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php:50 Stack trace: #0 D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Catalog...') #1 D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Catalog...') #2 D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\Factory\AbstractFactory.php(246): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Catalog...', NULL, 'filterableAttri...', 'Magento\\Catalog...') #3 D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime(' in D:\xampp\htdocs\magento233\vendor\magento\framework\ObjectManager\Factory\Dynamic\Developer.php on line 50

Is there anything I am missing or anywhere I am doing wrong ?


texts: How do I add a api created guest cart to active guest user or how to get quote ID from active guest user

texts:
I have a Magento store and a Wordpress website on the same domain, I want to view edit add and delete products from both sites.

So far I've been able to get the products from the local storage and show them on the WordPress website.

I am able to create a guest cart trough the Magento API and add products to this cart.

So now I need to add the guest cart to the current user on Magento (or get the quote id of the Magento cart in WordPress)


texts: Magento 2 load data from customer in custom_attribute field in Checkout

texts:
How get data from a customer in custom_attribute fields in the Magento2 Checkout?

I need to load customAttributes from customer if is logged in into this custom_attributes input texts

The LayoutProcessor get the custom_attributes, I need to put in a value of this input texts the data from the Customer (custom attributes).

Any ideas?


texts: How to get cart products in email template magento 1.9?

texts:
I am using abandoned cart extension, which is sending the normal reminder email to the customer. Now, I want to add products in the email template.

How can do this? Can anyone help?


texts:
I am trying to validate email in my custom controller file. Here is the code that i am trying...

if (!\Zend_Validate::is(trim('test@r-u-i-.com'), 'EmailAddress')) {
    echo "not valid";
}else{
    echo "valid...";
}

This validation return me that this is a valid email address.
But when i am trying to create customer, Magento return me this error "Email has a wrong format"


texts: {{block type...}} in CMS not visible in frontend

texts:
I use Magento 1.9.2.3 and I have a problem when I insert this code inside a CMS block:

{{block type="filterproducts/featured_home_list" name="latest_list" product_count="10" template="filterproducts/list.phtml"}}

This block is not shown in the frontend, I always see a white space.


texts: How to hide COD payment method for specific product?

texts:
I want to hide cash on delivery payment method for a specific product.

How can I do this?


texts:
I need to select all the attributes of the products these columns of all products in the tables:

Any suggestion?

--

TABLE: catalog_product_entity

COLUMN: sku

--

TABLE: catalog_product_index_price

COLUMN: price

--

TABLE: cataloginventory_stock_status

COLUMN: qty

COLUMN: stock_status

--

TABLE: catalog_product_index_price

COLUMN: price


texts:
As described in this question
in Magento 2 if I insert a new product or update an existing one using only comma in price
it uses it as a decimal separator.
Example: if I set the price to 10,000 it gets saved as 10.0000.
I tried with a before plugin on Magento\Catalog\Controller\Adminhtml\Product\Save that takes out the commas in price from request but it still behaves like stated above.
How can I change this programatically? Is there a class I can use a plugin in or a preference perhaps.


texts: Social Sharing Button On Affiliate Marketing Page in Magento1.9

texts:
I want to add social sharing button in affiliate marketing material page.which is use for customer to sharing link through social sites.
so there is any extention??if not then how to create custom button integration?
if anyone know then help me...


texts: product personalization feature - upload image & text from frontend - module or theme?

texts:
We need product personalization feature, means we want customers to upload the product image and add text from frontend. then when he buy product, we will send a product with same image.
[ ex product- T-shirts ]. For this we want to know which is better option:

Do we need to create new module and make one custom phtml page exactly looking like product view page and add options of uploading image & text.
We can create new theme. We can assign this theme to those custom products and add option of uploading image & text in product view page.


texts: I tried to install elasticsearch on VPS server and almost did it but show error when I tried to start elasticsearch

texts:
I tried to install elasticsearch on VPS server and almost did it but shows error when I tried to start elasticsearch. This is the error: error while starting elasticsearch
I am trying to work on Magento 2 which requires elasticsearch. It would be grateful if anybody can help me out,


texts: Does Magento support USPS Parcel Select Shipping Method

texts:
The requirement for shipping method for USPS on the site I'm working on is Parcel Select. I don't seem to be able to locate the Parcel Select method in the option list. As part of the requirement, the Parcel Select is also need to be setup as Free Method.

We're on latest Magento CE 1.9.1.0. Is the option available or is it under different name? Thanks.


texts: Rollback database backup from magento 2.2.7 to 2.3.0

texts:
Is possible to rollback databse backup that is created on Magento 2.2.7 to Magento 2.3.0 ?

Thanks!


texts: AddAttributeToSelect always selects all attributes plus selected attributes

texts:
I have added the attributes to select. But it gives all the attributes always. I only need selected atributes to display.

$productModel = Mage::getModel('catalog/product');
//Category id predifined
$categoryId = 132;
$collection = $productModel
             ->getCollection()
             ->joinField('category_id', 'catalog/category_product', 'category_id', 'product_id = entity_id', null, 'left')
             ->addAttributeToSelect('device_case_id')
             ->addAttributeToSelect('device_type')
             ->addAttributeToSelect('entity_id')
             ->addAttributeToSelect('case_mask_image')
             ->addAttributeToSelect('case_top_image')
             ->addAttributeToSelect('price')
             ->addAttributeToSelect('thumbnail')
             ->setOrder('entity_id', 'asc')
             ->addAttributeToFilter('category_id', array('in' => array($categoryId)));

foreach($collection as $product){
    $data[] = $product->getData();
}


texts: Product gallery disappear after page load

texts:
I have a problem with the product page. After the page load all the resource, all the product gallery images disappear except for the first one (each product have 4/5 pictures).
I try to add

<script type="text/javascript">var $ = jQuery.noConflict();</script>

in the footer and the gallery works fine. By the way the "Add to Cart" Button stop working.

I can't find the issue/conflict with the image gallery.

Thanks

EDIT: Clearer explanation + image


texts:
I am developing a program, using Magento V2 SOAP API, but I can not find how to Create Product, the API only provide me DeleteEntity, GetList Entity, and Save Entity.
I have tried to use catalogProductRepositoryV1Save, but got an exception "Can not save product". But I can get all product details using GetList APP.

anyone can help me? code as below:

using (OperationContextScope scope = new OperationContextScope(mservice.InnerChannel))
                {
                    var httpRequestProperty = new HttpRequestMessageProperty();

                    httpRequestProperty.Headers[System.Net.HttpRequestHeader.Authorization] = "Bearer " + accessToken;
                    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;

                    CatalogProductRepositoryV1SaveRequest x = new CatalogProductRepositoryV1SaveRequest();

                    var t = new CatalogDataProductInterface();
                    t.attributeSetId = 4;
                    t.name = "Jason Test";
                    t.price = 456;
                    //t.priceSpecified = false;
                    t.sku = "34567890";
                    t.visibility = 1;
                    t.weight = 3;
                    t.typeId = "Simple";
                    t.status = 1;
                    t.createdAt = t.updatedAt = DateTime.Now.ToShortDateString();
                    t.productLinks = null;
                    t.attributeSetIdSpecified = true;
                    t.extensionAttributes = null;
                    t.mediaGalleryEntries = null;
                    t.id = 0;

                    var m = new FrameworkAttributeInterface[3];
                    //var w = new CatalogDataProductExtensionInterface();

                    // 1st Attribute
                    m[0] = new FrameworkAttributeInterface { attributeCode = "C1", value = "I3" };
                    // 2nd attribute
                    m[1] = new FrameworkAttributeInterface { attributeCode = "O2", value = "W8" };
                    m[2] = new FrameworkAttributeInterface { attributeCode = "S3", value = "15" };

                    t.customAttributes = m;
                    x.product = t;
                    var DEST = mservice.catalogProductRepositoryV1Save(x);


texts:
I am trying to set the IsAnchor attribute for individual categories via the api however, I keep running into this error.

{"message":"Property \"IsAnchor\" does not have corresponding setter in class \"Magento\\Catalog\\Api\\Data\\CategoryInterface\".","trace":"#0...

I am using the catalogCategoryRepositoryV1
/V1/categories/{id} operation.

When I do a get, I can see that the property does exist.

Has anyone run into this issue before?

I have not found a solution via google.

Thank you.


texts: How can i change product attribute value in catalog_product_save_after observer?

texts:
How can I change the attribute of a product in catalog_product_save_after event.

I am getting the product object. I set data in a particular attribute and set $product->save().

This stops everything, admin page doesn't open at all.
I have to fire service php-fpm restart.


texts: PDOException: SQLSTATE[HY000] [2002] No such file or directory error fixed, but now website is very slow / unresponsive

texts:
Before the fix, I tried to install the printful module, got through to Step 3 to where you enable the module and paused half way through execution. The front or back-end wasn't loading and after ages of trying to load it, it gave me this error on my browser:

I followed this link on fixing this error, changing localhost to 127.0.0.1. This worked, as I can log in to the back-end and the front-end loads but is taking forever to load to the next page that I navigate to, sometimes so long that it times the admin account out and goes back to the login.

I've allocated 2G in the PHP memory_limit, but when I go to bin/magento c:c
I get this error:

mmap() failed: [12] Cannot allocate memory
PHP Fatal error:  Out of memory (allocated 10485760) (tried to allocate 12288 bytes) in /var/www/html/vendor/zendframework/zend-uri/src/Uri.php on line 1024

I am so confused.


texts:
Generally Magento's index can be updated in 3 ways (depending on usage and configuration):

"On Save"
"By Schedule"
Using indexer:reindex command

This is what I can gather from the description in the official documentation for each of these ways:

The index will be updated immediately when e.g. a product is changed in the back end and saved.
According to the graphic of the Indexing types in the documentation, when editing and saving a product, entries are made in a changelog table (via MySQL triggers). Magento's cron:run command (which would be set up to run every minute by default) will then index those changed products.
This command will update the complete index.

Just for clarification I want to know if the following is true for each of the 3 ways of updating the index:

The index is updated "On Save" only for the affected data (i.e. the changed product), not the whole index (which would take very long).
The index is only updated for the changed products (should be obvious).
The index is updated for all products, regardless of whether they have been changed or not.

And to clarify further: is it true, that the only way to update the index only for changed products is via "On Save" or via "By Schedule" plus cron:run?


texts: How Can I Bulk Import Image Label By CSV

texts: I need to import image label of my images, how can i do it by csv,


texts: Undefined variable: escaper (Magento 2 @var syntax)

texts:
I have a theme I purchased from ThemeForest, but they are not being helpful (they don't understand english much!)
My question in terms of loading Classes are based on the following:
<?php
/** @var $block \Magento\Catalog\Block\Product\Image */
/** @var $escaper \Magento\Framework\Escaper */
/** @var \Magento\Framework\View\Helper\SecureHtmlRenderer $secureRenderer */
/**
 * Enable lazy loading for images with borders and if variable enable_lazy_loading_for_images_w>
 * is enabled in view.xml. Otherwise small size images without borders may be distorted. So max>
 * to prevent stretching and lazy loading does not work.
 */
$borders = (bool)$block->getVar('product_image_white_borders', 'Magento_Catalog');

The 'commented' @var syntax as inside there, is Magento 2 supposed to 'autoload' those class definitions/files?
This is the error:
Exception #0 (Exception): Notice: Undefined variable: escaper in
/var/www/html/app/design/frontend/Sm/market/Magento_Catalog/templates/product/image_with_borders.phtml on line 35

Line 35:
<img class="<?= $escaper->escapeHtmlAttr($block->getClass()) ?>

I am trying to figure out why they used 'commented @var entries', and why Escaper is undefined.
Interestingly, $block as image does not fail a few lines upwards: (line 15)
$block->getVar('product_image_white_borders', 'Magento_Catalog');`

It feels more like Magento\Framework is not loaded, I see no module Magento_Framework for instance. NOTE: I assume Framework is loaded differently by Magento 2, but I can't verify if it working or not!
This must be something not loaded, because they use @var definitions in alot of their templates.
Extra info
I have already run
bin/magento setup:upgrade && \
bin/magento setup:static-content:deploy -f en_GB en_US && bin/magento setup:di:compile

Please assist, Thanks!


texts: Magento2 Check if Customer is logged in - Not working

texts:
I have taken the reference from this link

Created the variable protected $_customerSession;

Done the injection \Magento\Customer\Model\Session $customerSession,

But in my Function in my block class it always returns as false

var_dump($this->_customerSession->isLoggedIn());

Then I tried checking whats Happening in $_SESSION

[_session_validator_data] => Array (
    [remote_addr] => ::1
    [http_via] =>
    )
[_session_hosts] => Array (
    [localhost] => 1
    )
[default] => Array (
    [_form_key] => k9RrgTSkjcgnJ1iZ
    )
[customer_base] => Array (
    [customer_group_id] => 0
    [customer_id] =>
    )
[checkout] =>  Array ( )
[catalog] =>  Array ( )
[reports] => Array (
    [product_index_viewed_count] => 1
    )
[message] =>  Array ( )
[review] =>  Array ( )

My block is extending Template class

use Magento\Framework\View\Element\Template as Template;

My construct function looks like this

public function __construct(
        \Magento\Framework\View\Element\Template\Context $context,
        \Vendor\Module\Model\Faq $faq,
        \Vendor\Module\Helper\Data $dataHelper,
        \Magento\Customer\Model\Url $customerUrl,
        \Magento\Framework\Registry $registry,
        \Magento\Customer\Model\Session $customerSession,
        array $data = []
        ) {
            $this->faq = $faq;
            $this->_registry = $registry;
            $this->_dataHelper = $dataHelper;
            $this->_customerUrl = $customerUrl;
            $this->_customerSession = $customerSession;
            parent::__construct($context, $data);
            $this->setTabTitle();
    }

Just to add My php file in my block is custom file in my custom module.


texts: Magento 2: Redirect custom attribute option to cms page url in obsever

texts:
How to redirect if custom attribute option value != 5431 to cms page else redirect to module Controller (prescription/index).
Till now both conditions redirecting to  module Controller
<?php

namespace Softadroit\Prescription\Observer;

use Magento\Framework\Event\ObserverInterface;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Event\Observer as EventObserver;
use Magento\Framework\App\ObjectManager;
use Psr\Log\LoggerInterface;

class Orderplaceafter implements ObserverInterface
{
    protected $_responseFactory;
    protected $_url;
    protected $_order;

    public function __construct(
        \Magento\Framework\App\ResponseFactory $responseFactory,
        \Magento\Framework\UrlInterface $url,
        \Magento\Sales\Api\Data\OrderInterface $order
    ) {
        $this->_responseFactory = $responseFactory;
        $this->_url = $url;
        $this->_order = $order;
    }

    public function execute(\Magento\Framework\Event\Observer $observer)
    {
        $event = $observer->getEvent();
        $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
        $_checkoutSession = $objectManager->create('\Magento\Checkout\Model\Session');
        $_quoteFactory = $objectManager->create('\Magento\Quote\Model\QuoteFactory');

        $orderid = $observer->getEvent()->getOrderIds();
        $order = $this->_order->load($orderid);

        foreach($order->getItemsCollection() as $_item){
        $product = $_item->getProductId();
        //echo $_item->getName(); die();

        $is_priscription =  $_item->getProduct()->getMyCustomAttribute('prescription');

        if($is_priscription != '5431'){
            $customRedirectionUrl = $this->_url->getUrl('order-success');
            return $this->_responseFactory->create()->setRedirect($customRedirectionUrl)->sendResponse();
            }
        }

        $order = $_checkoutSession->getLastRealOrder();
        $quote = $_quoteFactory->create()->loadByIdWithoutStore($order->getQuoteId());

        if ($quote->getId()) {
            $quote->setIsActive(1)->setReservedOrderId(null)->save();
            $_checkoutSession->replaceQuote($quote);
            $url = $this->_url->getUrl('prescription/index'); //('[ModuleName]/[ModuleName]/[[Action]');
            $this->_responseFactory->create()->setRedirect($url)->sendResponse();
            die();
        }
    }
}


texts: Custom credit card module | Direct integration | PikPay Payment Gatway

texts:
Here is the link of internet payment gateway in my country:

https://ipg.pikpay.ba/

There are two ways to integrate this payment gateway.

Form integration
https://ipg.pikpay.ba/en/documentation/form

and

Direct integration (which I would like to use)
https://ipg.pikpay.ba/en/documentation/direct

Has anybody ever tried to implement custom payment in Magento. Basically this is whole documentation I have. Any suggestion how do this. Any tutorial you can point me to.


texts: Magento : Hide admin side menu “mobile” inside custom plugin

texts:
I had to hide Some menus in Admin side.

I refered MANY questions here on Stackoverflow , on other sites . BUT they simply say ,

Create a file called adminhtml.xml under /etc folder of your module:

BUT no one told what should be in module , will it have class , what should be in it????

Lets take it easy :

I hav all folders like ,controller,Model .. In folder local\MyCompanyName\WelcomeInsync NOW WHAT ?

I simply created adminhtml.xml in etc folder but NOTHING happened

I used following

<?xml version="1.0" encoding="utf-8"?>
<config>
    <menu>
        <xmlconnect> <!-- <xmlconnect> to match adminhtml.xml file of Mage_XmlConnect module -->
            <depends>
                <module>HideMe</module> <!-- Fake dependance to hide tab -->
            </depends>
        </xmlconnect>
    </menu>
</config>

What should be done ? I have folders only blank ,just etc has files config.xml + adminhtml.xml.

I tried cache clearing Nothing Worked . Is there any magento EXPERT to answer ? THANKS!


texts: Magento 2 - Change load order of custom page layout

texts:
I created a new page layout, but I noticed that it does not get loaded last and it gets overridden from other layouts.
Is there a way to change the load order so that my custom page layout gets loaded last?
Example:
I have this simple layout where I create a new block which just shows the text foobar123. I move it after the header.container.
THEME\layout\catalog_product_view.xml
<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>

        <block class="Magento\Framework\View\Element\Template"
               name="test_foobar"
               template="Hausfux_Base::test.phtml" />

        <move element="test_foobar" destination="page.wrapper" after="header.container"/>
    </body>
</page>

THEME\Company_Base\templates\test.phtml
foobar123

Now I create a new page layout and try to move it after the footer only for this page layout.
THEME\Magento_Theme\layouts.xml
<?xml version="1.0" encoding="UTF-8"?>
<page_layouts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/PageLayout/etc/layouts.xsd">
    <layout id="hf-grouped-product-big-1col">
        <label translate="true">Hf Grouped Product (Big) -- 1 Col</label>
    </layout>
</page_layouts>

THEME\Magento_Theme\page_layout\hf-grouped-product-big-1col.xml
<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>

    <move element="test_foobar" destination="page.wrapper" after="footer-container"/>
</layout>

Now I select my new custom page layout Hf Grouped Product (Big) -- 1 Col on a product and load it, then the text "foobar123" is showing, but still after the header, because my custom page layout is getting loaded before catalog_product_view.xml.
How can I make my custom page layout always get loaded last?


texts:
I need to have the categories list display alphabetically by default.  I have a large number of categories/sub-categories and list them in various ways around the site.  How can I always have the categories list alphabetically?

Thank you


texts: Magento 1 Export attributes of different types (via script form)

texts:
I was trying to create some robust form of exporting EAV values from the DB. Idea is to have a basic set of columns ... then the admin can enter the attribute they want to add to the collection. The code below is working for most attribute types ... long text, dropdown ... but not! simple text values.
(assume _POST["attributecodes"] contains comma separated list of existing attribute types)
$attributes = array();
if (isset($_POST["attributecodes"]) && !empty($_POST["attributecodes"])) {
    $attribute_codes = array_map('trim', explode(',', $_POST["attributecodes"]));
    foreach ($attribute_codes as $attribute_code) {
        $attribute_code = trim($attribute_code, ',');
        $attribute = Mage::getSingleton('catalog/product')->getResource()->getAttribute($attribute_code);
        if (!$attribute) {
            print("Attribute with code {$attribute_code} does not exist");
            Mage::throwException("Attribute with code {$attribute_code} does not exist");
            exit;
        } else {
            if ( ($attribute->getFrontendInput() === 'select' && $attribute->getSource() instanceof Mage_Eav_Model_Entity_Attribute_Source_Table) ||
                 ($attribute->getFrontendInput() === 'multiselect' && $attribute->getBackend() instanceof Mage_Eav_Model_Entity_Attribute_Backend_Array) ) {
                    $data->addAttributeToSelect($attribute_code . '_value');
            } else {
                $data->addAttributeToSelect($attribute_code);
            }
        }
    }
}


texts: How to add JS file to all pages in Magento

texts:
Let's assume I have a company named Company and I'm developing a magento module named Module. What I want my module to do is simple: Add a JavaScript file to header tag of ALL pages in magento. But for some reason, it doesn't add the script in any pages.

Note: Currently I'm testing it for frontend.

Note 2::I'm using XAMPP (php 5.6, mysql 5.6, apache 2) if that's relevant.

Here is my directory tree:

Root
├───app
│   ├───code
│   │   └───local
│   │       └───Company
│   │           └───Module
│   │               └───etc
│   │                       config.xml
│   │
│   ├───design
│   │   └───frontend
│   │       └───base
│   │           └───default
│   │               └───layout
│   │                       module.xml
│   │
│   └───etc
│       └───modules
│               Company_Module.xml
│
└───js
    └───company
            module.js

Content of app\etc\modules\Company_Module.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Module>
            <active>true</active>
            <codePool>local</codePool>
        </Company_Module>
    </modules>
</config>

Content of app\code\local\Company\Module\etc\config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Company_Module>
            <version>0.1.0</version>
        </Company_Module>
    </modules>
    <frontend>
        <layout>
            <updates>
                <module>
                    <file>module.xml</file>
                </module>
            </updates>
        </layout>
    </frontend>
</config>

Content of app\design\frontend\base\default\layout\module.xml:

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
        <reference name="head">
            <action method="addJs">
                <script>company/module.js</script>
            </action>
        </reference>
    </default>
</layout>

Content of js\company\module.js :

alert('Yes!');


texts: Where magento store data from account info on order page

texts: Where does magento store the data which is shown in the block Account information in adminarea in order edit page?


texts:
I'm running the latest version of Magento, 1.9.4.2, which includes the patch SUPEE-5994.

Even with that, I'm still getting this notice their Security Scanner:

SUPEE-5994 - Failed.Admin login screen detected (APPSEC-977)

What it means and how to fix this?


texts:
I have created an attribute price_used and the type is price. I know how to display this price in frontend, i use this method and it works ok:

<?php echo Mage::helper('core')->currency($_product->getPriceUsed(),true,false); ?>

I need to create a separate addtocart for this price, i have tried many things for example overide observer but it will affect also normal price.

What would be the correct method to make this work for my custom price and also not affect the normal price?

I do not want to use magento's custom options for products.


texts: customer segments based on number from .. to

texts:
I created a custom customer attribute which is a text field and is a numeric only field.  This is an internal attribute that is populated by some calculations and is never seen by the use.  I want to be able to use this field in a customer segment and do a range value on it for the segment.  So say the field is called rank, I want to be able make segments like so.

Segment 1: Rank > 0 and Rank < 100
Segment 2: Rank > 100 and Rank < 500
Segment 3: Rank > 500 and Rank < 1000
Segment 4: Rank > 1000

Any ideas how I can go about creating segments like this?

The only options I get are:

Is
Is Not
Contains
Does Not Contain


texts:
I've scoured the boards but can't find the specific answer.

Fedex Shipping is not working (new install) in 1.9.  The release notes indicated to do the following (below). Did that, but no luck.  Any suggestions.  We need this to work - Yesterday!!!

FedEx changed their endpoints for sandbox and production to the following:
Production: https://ws.fedex.com/web-services
Sandbox: https://wsbeta.fedex.com/web-services
Because of these changes, Magento cannot retrieve shipping rate information or print shipping labels for FedEx unless this fix is applied.


texts: Magento 2 – Assign Associated Products To Configurable Product

texts:
I want to create configurable product programmatically. I have followed below steps. But got the error to last step.

Created the simple product programmatically and its working.
Try to create configurable product programmatically. By this, product added but configuration section blank, the simple product doesn't add.
Then try to link simple product to configurable product but this one also not working and got this error "Option values are not specified."

I am using Magento 2.1.4

Can any one help me to create configurable product programmatically?

Thank you


texts: Including magento js files in custom module layout file - magento 2

texts:
I'm new to Magento. I want to include the following js files in my custom module's layout file in the following location.

  app/code/MyVendor/MyModule/view/adminhtml/layout/mymodule_template_custom.xml

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
    <title>
        My Module Custom Page
    </title>
    <meta name="viewport" content="width=1024"/>
    <css src="MyVendor_MyModule::css/custom.css"/>
    <link src="Magento_Sales::order/giftoptions_tooltip.js"/>
    <link src="Magento_ConfigurableProduct::js/configurable.js"/>
    <link src="Magento_Sales::order/create/scripts.js"/>
    <link src="Magento_Catalog::catalog/product/composite/configure.js"/>
    <link src="Magento_Sales::order/create/giftmessage.js"/>
</head>

But when I take "view page source" I'm unable to see the same js files included.

Kindly help me

Thanks In Advance


texts: Magento 2 : How can I add customer dashboard navigation programatically

texts:
Let's talk abstract: I have a certain parameter which determines wether or not the customer account dashboard navigation should be shown on a page or not.

My CMS page has the layout '2 columns left' and I use a plugin/interceptor to try to manipulate the layout.

In short, when I add a cms_page_view.xml to my module, and add the following, the navigation is shown:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <update handle="customer_account" />
</page>

Of course, this will add the customer dashboard navigation to all CMS pages, and I only want this to be visible on some pages. So currently I'm using a plugin to wrap around the \Magento\Cms\Controller\Page\View::execute()-method:

public function aroundExecute(\Magento\Cms\Controller\Page\View $subject, callable $proceed)
{
    $pageId = $subject->getRequest()->getParam('page_id', $subject->getRequest()->getParam('id', false));

    /** @var \Magento\Framework\View\Result\Page $resultPage */
    $resultPage = $proceed();

    // Some code that determines whether or not this CMS page should have the dashboard navigation:
    if ( ... ) {
        // Add customer_account layout update:
        // This is the part that doesn't work...
        $resultPage->getLayout()->getUpdate()->addUpdate('customer_account');
    }

    return $resultPage;
}

Why doesn't this work and how can I make it work? An interesting sidenote is that if I add a layout update in the admin with the following:

<update handle="customer_account" />

It also doesn't work. Any thoughts on this matter anyone? I'm using Magento 2.1.3


texts: how to display enable/disable(multi select) custom shipping methods at admin side?

texts:
I created custom shipping methods using following link

http://www.smashingmagazine.com/2014/01/15/create-custom-shipping-methods-magento/

Now I want enable /disable option(multiselect) at system->configuration->shipping methods->custom carrier

(For example ups carrier->allowed methods multiselect field in system configuration->shipping methods).

In order to get I'm using following code in system.xml

<allowed_methods translate="label">
    <label>Allowed Methods</label>
    <frontend_type>multiselect</frontend_type>
    <source_model>smashingmagazine_mycarrier/source_methods</source_model>
    <sort_order>20</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>1</show_in_website>
    <show_in_store>0</show_in_store>
    <can_be_empty>1</can_be_empty>
 </allowed_methods>

and I created Methods.php in proper place.

class SmashingMagazine_MyCarrier_Model_Source_Methods
{
    public function toOptionArray()
    {

        $arr = array();
//how to get created custom shipping methods here?

        return $arr;
    }
}


texts: Retrive the total amout of money spend on the site by a customer with Soap

texts:
My question is quite simple.
On the web interface, when I edit one customer: Clients > Client Information > Client View
In the Sales statistics the filed "Sales from the begining" interests me. It tells how much the client has spent on the site since it exists.
I would like to retrive this value with SOAP does anyone knows how to do it ?
I've checked the API documentation but didn't find this value.
So far I'm able to do simple tasks with my SOAP script: list all customer, list one customer information...So my question is not about how to program or make Magento accessible with web services.
Thank you


texts: Magento2 - How to override this file in magento2 Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Options.php

texts:
How to override this file in Magento2

Magento\Bundle\Block\Catalog\Product\View\Type\Bundle\Option


texts: How to draw Product image in pdf in Magento 2

texts:
I want to put product image in pdf for that I have created on function with name Insertfunction and call it from getPdf.

we have tried following code.

public function getPdf($orders = [])
{
    $this->_beforeGetPdf();

    $pdf = new \Zend_Pdf();
    $this->_setPdf($pdf);
    $style = new \Zend_Pdf_Style();
    $this->_setFontBold($style, 10);

    foreach ($orders as $order) {

        if ($order->getPoStoreId()) {
            $this->_localeResolver->emulate($order->getPoStoreId());
            $this->_storeManager->setCurrentStore($order->getPoStoreId());
        }
        $page = $this->newPage();

        /* Add image */
        $this->insertLogo($page, $order->getStore());

        /* Add document text and number */
        $this->drawPoInformation($page, $order);

        $this->drawAddresses($page, $order);

        $this->drawPublicComments($page, $order);

        $this->_drawHeader($page);

        /* Add body */
        foreach ($order->getAllItems() as $item) {

            /* Draw item */
            $this->_drawItem($item, $page, $order);

            $this->insertImage($item, 70, 70, 205, 70);
            $page = end($pdf->pages);
        }

        $this->insertCosts($page, $order);

        $this->insertTotals($page, $order);
        $this->drawPrivateComments($page, $order);
        $this->insertAdditionnal($page, $order);

        if ($order->getPoStoreId()) {
            $this->_localeResolver->revert();
        }
    }
    $this->_afterGetPdf();
    return $pdf;
}

public function insertImage($item, $x1, $y1, $x2, $y2, \Zend_Pdf_Page &$page)
   {

   $om = \Magento\Framework\App\ObjectManager::getInstance();

    try{

        $product = $this->productRepositoryFactory->create()->getById($item->getProductId());

        //Draw image to PDF
        $productImage = '/catalog/product' . $product->getImage();

        $fileSystem = $om->create('\Magento\Framework\Filesystem');
        $pdfImage =$fileSystem->getDirectoryRead(\Magento\Framework\App\Filesystem\DirectoryList::MEDIA)->getAbsolutePath("catalog/product".$product->getImage());

        $image =  \Zend_Pdf_Image::imageWithPath($pdfImage);

        $page->drawImage($image, $x1, $y1, $x2, $y2);
    }
    catch (\Exception $e) {

        return false;
    }
}


texts: Magento 2 knockout JS template for Product listing and detail page

texts:
I was wondering since knockout was introduced in magento 2 why this has not been implemented fully.

For example I see knockout been use only in checkout page.

Pages like product listing page, detail page why knockout has not been implemented? Is there any reason?

I want to implement knockout in listing and detail page with layer navigation. How to implement it in catalog pages?


texts: Magento2 Show products from a specific category on homepage

texts:
I am trying to load a custom phtml on my homepage that would show products from a specific category within an owl carousel. My issue is I am notable to get the product listing to work.

Code here

  app/code/Firstimage/ProductSlider/Block/productslider.php

 namespace Firstimage\ProductSlider\Block;
 class ProductSlider extends \Magento\Framework\View\Element\Template
 {
     protected $_categoryFactory;

     public function __construct(
        \Magento\Backend\Block\Template\Context $context,
        \Magento\Catalog\Model\CategoryFactory $categoryFactory,
        array $data = []
     ) {
       $this->_categoryFactory = $categoryFactory;
       parent::__construct($context, $data);
   }

   public function getCategory($categoryId)
   {
       $category = $this->_categoryFactory->create();
       $category->load($categoryId);
       return $category;
       return $category->getData();
   }

   public function getCategoryProducts($categoryId)
   {
     $products = $this->getCategory($categoryId)->getProductCollection();
     $products->addAttributeToSelect('*');
     return $products;
     return $products->getData();
   }
}

Then my frontend phtml files which is located

  app/design/frontend/firstimagedesign/rjtheme/Magento_Theme/templates/html/favoritestyles.phtml

<?php
$categoryId = 81; // this is the category holding your products
$categoryProducts = $block->getCategoryProducts($categoryId);
foreach ($categoryProducts as $product)
{
    //print_r($product->getData());
    // printing category name and url
    echo $product->getName() . ' - ' . $product->getProductUrl() . '<br />';
}

My issue seems to be now that in my phtml file the $categoryProducts has a value of NULL and not sure why since category ID 81 has products and is enabled.


texts: How to make the Video Autoplay in cms block? Magento 2.2

texts: In Cms Block, I'm trying to add an embed Youtube video that would autoplay upon the page is loaded. However, the part that defines autoplay "?autoplay=1&loop=999999999999&playlist=_bkTXNozzzQ" in the url is trimmed off after saving the block. Is there any way I can make it happen?


texts: i want reformat code, i'm moving code from controller to services. I'm facing problem with it. i'm not call function from services to controller file. Please help me


texts: Magento 1.9.3.7 Set expiration time/date for downloadable products

texts:
Is there a way to set the time for which a purchased downloadable product is valid?

Let's say, I have a downloadable product on my customer account, and this is valid until some specific date.

Thanks for your collaborations or ideas


texts: Magento2 Alternate of Method getCollection() which is deprecated

texts:
I have checked the similar post: Magento2.2 getCollection from Factory deprecated

But I still don't find the answer of it. I am calling getCollection() function, and PHPStorm saying that this function is deprecated.

$this->_myCollectionFactory->create()->getCollection()

where $this->_myCollectionFactory is the instance of my collection factory which is \Vendor\Module\Model\ModuleFactory.

And this is my ModuleFactory class code

<?php

namespace Vendor\Module\Model;

class ModuleFactory
{
    /**
     * @var \Magento\Framework\ObjectManagerInterface
     */
    protected $_objectManager;

    /**
     * @param \Magento\Framework\ObjectManagerInterface $objectManager
     */
    public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
    {
        $this->_objectManager = $objectManager;
    }

    /**
     * Create new country model
     *
     * @param array $arguments
     * @return \Magento\Directory\Model\Country
     */
    public function create(array $arguments = [])
    {
        return $this->_objectManager->create('Vendor\Module\Model\Module', $arguments, false);
    }
}

My question is, what is the alternate of getCollection if it is deprecated?


texts: Magento 2 Product Price for multiple store is not correct

texts:
I am using 2 stores,

Main/Default store is working fine but in second store, the price I am giving to product is not showing accurate.

In frontend it calculate and showing price by using this formula:

  (actual_price / default_store_tax ) * current_store_tax

I want to display actual price in frontend which I am adding in backend.

In my configuration I am showing price including tax.

Please guide me.


texts: How can i apply the Shopping Cart Pricing Rule?

texts:
Row total in cart,

Below $25 get 25% discount
below $50 get 30% discount
Below $75 get 35% discount
Above $75 get 40% discount


texts: Magento2 add custom logic to shopping cart rule using Observers

texts:
How can I add custom logic using observers when cart rules apply in checkout?

I want to apply buy 3 of x,y,z get 2 of a,b free and discount. Is it possible in cart rules?


texts:
Is there a set of guidelines that I can go by to decide when I should use

   mage::getModel() and mage::getSingleton()

From what I can tell it seems as though getSingleton either gets an existing instance of a model/class or, only if one does not exist, creates a new instance. Whereas getModel() creates one regardless of what exists already. Is this correct?

Assuming I have the correct understanding of these, would it not make sense to always use mage::getSingleton()! It obviously doesn't or otherwise getModel() would not be used. So when should I use each one?

What is the main benefit to using these correctly? Should it improve performance, help avoid duplication or just generally apply best practice?


texts: The CMS menu does not work in the backend panel

texts:
My site was affected by guruincsite[.]com, then follow the steps to fix the problem. The CMS menu does not perform as expected, also so with backups section.

Then leave a screenshot of how it looks and does not work when you click each menu.


texts: add to cart button on featured products is not working

texts: please visit this link : on home page, "add to cart button" on featured products is not working.


texts: Magento 2.2 error "The page isn’t redirecting properly"

texts:
I am testing my own module on Magento CE 2.2.0 but keep getting "The page isn’t redirecting properly". Looking at the network traffic I see these requests:

/magento22-acumulus/admin/
/magento22-acumulus/admin/admin/index/denied/
/magento22-acumulus/admin/admin/auth/login/
/magento22-acumulus/admin/admin/
/magento22-acumulus/admin/admin/index/denied/
/magento22-acumulus/admin/admin/auth/login/
/magento22-acumulus/admin/admin/
/magento22-acumulus/admin/admin/index/denied/
/magento22-acumulus/admin/admin/auth/login/
/magento22-acumulus/admin/admin/
...

My setup:

local install on base url /magento22-acumulus/
Wampserver 3.0.8 with php 7.0.10 and Apache 2.4.23

What I did:

install Magento 2.2.0 with sample data
settings changed: remove secret key and use standard admin/ url
tested it: I do get the login screen
install my module, module:enable, setup:upgrade, setup:di:compile
tested it: error as above
module:disable, cache:clean, setup:di:compile
tested it: I do get the login screen
repeated this a number of times, same pattern, so I was thinking it had to do with my module.
But then I got my module working once and I was able to go to my own pages. Unfortunately the error came back, so I continued to do some debugging enabling and disabling my module but could not locate the problem
and now I also get the problem without my module enabled. So I think it is some strange condition/bug in Magento itself.

What could be the problem here?


texts: What is __prepareLayout Function Return and what is hasData and setData perform ?

texts:
public function _prepareLayout()
{
    return parent::_prepareLayout();
}

And

public function getVire()
 {
    if (!$this->hasData('vire')) {
        $this->setData('vire', Mage::registry('vire'));
    }
    return $this->getData('vire');

}


texts: Magento 2: language pack not working properly after .csv file was edited

texts:
I installed this language pack https://github.com/splendidinternet/Magento2_German_LocalePack_de_DE. Everything worked fine.

Then I edited the following line in the magento-path\app\i18n\splendid\de_DE\de_DE.csv file:

"Add to Cart,Zum Warenkorb hinzufügen -> Add to Cart,In den Warenkorb"

When I go to category page, at first everything looks fine:

but when I click on the 'add to cart'(In den Warenkorb) button , the button text changes back to the translation "Zum Warenkorb hinzufügen", which was there before I edited the de_DE.csv file:

When I reload the site everything looks good again:

I think it has something to do with JS. Any hints on solving this issue ?

UPDATE: Changed Code in pub\static\frontend\<vendor>\<theme>\de_DE\Magento_Catalog\js\catalog-add-to-cart.js:

setTimeout(function() {
                var addToCartButtonTextDefault = 'In den Warenkorb'; //changed
                console.log("test1");         addToCartButton.removeClass(self.options.addToCartButtonDisabledClass);
                addToCartButton.find('span').text(addToCartButtonTextDefault);
                console.log("test2");
                addToCartButton.attr('title', addToCartButtonTextDefault);
            }, 1000);

Now it works


texts:
I would like to create links that will search the product catalog by price only without giving any text string.

e.g. a link like http://www.example.com/catalogsearch/result/?price=51-100 to directly search and return those products priced between 51 and 100?


texts: Magento 2 Configurable Product Out of memory

texts:
We have been using Ubertheme to transfer our magento1 store to magento2.  Everything seems to be working correctly, except when we go to a configurable product (backend or frontend), the Magento2 server spikes and start using all the memory on the server.

Wed Mar 13 14:12:34.051050 2019] [php7:error] [pid 2860] [client 173.49.71.23:61885] PHP Fatal error:  Allowed memory size of 6585057280 bytes exhausted (tried to allocate 20480 bytes) in /var/www/new.instantprecieux.fr/vendor/magento/zendframework1/library/Zend/Db/Select.php on line 979, referer:

The error changes between frontend and backend.  We had tried a 4GB RAM instance and then tried a 8GB Ram instance.

There are absolutely no other errors in either the Apache log folder or Magento var/log.

UPDATE: Here are the last lines from the profiler

"magento->LAYOUT->layout_render->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/options/wrapper.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml->TTT4:Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\Collection::_afterLoad",0.001798,0.001798,1,"9,848",0
magento->LAYOUT->layout_render->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/options/wrapper.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml->EVENT:magento_catalog_api_data_productinterface_load_after,0.007284,0.007284,1,"13,968",0
magento->LAYOUT->layout_render->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/options/wrapper.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml->EVENT:magento_catalog_api_data_productinterface_load_after->OBSERVER:legacy_model_load,0.007270,0.007270,1,"12,344",0
magento->LAYOUT->layout_render->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/options/wrapper.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml->EVENT:magento_catalog_api_data_productinterface_load_after->OBSERVER:legacy_model_load->EVENT:catalog_product_load_after,0.006344,0.006344,1,"9,016",0
magento->LAYOUT->layout_render->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/form.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-catalog/view/frontend/templates/product/view/options/wrapper.phtml->TEMPLATE:/var/www/new.instantprecieux.fr/vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml->EVENT:magento_catalog_api_data_productinterface_load_after->OBSERVER:legacy_model_load->EVENT:catalog_product_load_after->OBSERVER:inventory,0.006331,0.006331,1,"7,416",0


texts: Magento 1: Disable CC on Sales Emails if Order ID prefix = AMZ or EBAY

texts:
We sell on Amazon, eBay and via the website. I have setup the CC in the System > Configuration > Sales > Sales Emails to copy all of the emails there to the store owner (Order, Order Comments, Invoice, Invoice Comments, Shipment, Shipment Comments, Credit Memo, Credit Memo Comments).

Store owner wants to receive emails generated from the website only. Other orders from marketplaces, currently Amazon and eBay, these email should not be sent to him via the CC field. They have Order ID prefixes of AMZ and EBAY in front of them while the website orders have no prefix.

How can this be accomplished?


texts: How to get all category is active in magento 2

texts:
i tryed get all category in phtml by this code, but it not working, it get all category, not only category active. Please help me. Thanks all.

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$categoryFactory = $objectManager->create('Magento\Catalog\Model\ResourceModel\Category\CollectionFactory');
$storeManager = $objectManager->create('\Magento\Store\Model\StoreManagerInterface');
$categories = $categoryFactory->create()
    ->addAttributeToSelect('*')->addFieldToFilter('is_active', 1)
    ->setStore($storeManager->getStore());


texts: How to maintain custom session for custom login and registration account module in magento 1.9.2 community edition

texts:
I am devoloping a module in which I am creating separate account which not using anything of customer. I am not able to create a separate session for my module . I tried to study customer module's session.php but i didn't get it. I am not understanding this code :

public function __construct()
{
    $namespace = 'customer';
}

Also Please Guide me how can i achieve it , Any help will be appreciable.


texts: DropDown Value return save all instead of anyone

texts:
I am getting my shipping value from Magento,

sp_cost.php

<?php
ob_start();
require_once('./../app/Mage.php');
umask(0);
ini_set('display_errors',true);
ini_set('memory_limit', '1024M');
Mage::app()->loadArea('frontend');

function getShippingEstimate($productId,$productQty,$countryId,$postcode ) {

    $quote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore('english')->getId());
    $_product = Mage::getModel('catalog/product')->load($productId);

    $_product->getStockItem()->setUseConfigManageStock(false);
    $_product->getStockItem()->setManageStock(false);

    $quote->addProduct($_product, $productQty);
    $quote->getShippingAddress()->setCountryId($countryId)->setPostcode($postcode);
    $quote->getShippingAddress()->collectTotals();
    $quote->getShippingAddress()->setCollectShippingRates(true);
    $quote->getShippingAddress()->collectShippingRates();

    $_rates = $quote->getShippingAddress()->getShippingRatesCollection();

    $shippingRates = array();
    foreach ($_rates as $_rate):
            if($_rate->getPrice() > 0) {
                $shippingRates[] =  array("Title" => $_rate->getMethodTitle(), "Price" => $_rate->getPrice());
            }
    endforeach;

    return $shippingRates;

}

###### Post #######
if(isset($_POST['zip_postal_code']) && isset($_POST['country']))
    {
     $zip_postal_code = $_POST['zip_postal_code'];
     $country = $_POST['country'];

}

$results = getShippingEstimate('14419','1',$country,$zip_postal_code);
###### Post #######
// $results = getShippingEstimate('14419','1',"IND","642001"); // Predefined Value

$count = -1;
echo "<select name='shipping_cost'>";
foreach ($results as $result):
$count++;
?>
 <option value="<?php echo $count; ?>"> <?php echo $result["Title"]." - Rs ".$result["Price"];?>
 </option>
 <?php
endforeach;
echo "</select>";
?>

and i am using ajax for customer choose anyone, if customer selects anyone of dropdown all the values save into table, how to restrict?

Form

    Shipping Cost (Rs) :

     <input type="hidden" name="shipping_cost"  id="shipping_cost"/>

Ajax :

FYI -> https://snag.gy/fvTWXB.jpg


texts:
For example, I need to get special data from a table for prepare form-data to save (in controller). Currently I have a direct dependency for a model.

use Vendor\CustomerSurvey\Model\Survey;

/**
 * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
 */
class FormPost extends \Magento\Framework\App\Action\Action

...

$data = $this->_survey->getSomething();

But I know what magento has special classes like Repository, Registry, Model, Data (setters & getters). I have a question: what to use in this case?


texts: How to get all products in cart Magento 2.1

texts: How can I get the collection of all products in cart currently ?


texts:
I have a very weird situation where my Magento Module is not getting installed, but its getting registered.

This is my config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <Example_Module>
            <version>0.2.0</version>
        </Example_Module>
    </modules>
    <global>
        <helpers>
            <example_module>
                <class>Example_Module_Helper</class>
            </example_module>
        </helpers>
        <resources>
            <example_module_setup>
                <setup>
                    <module>Example_Module</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </example_module_setup>
            <example_module_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </example_module_write>
            <example_module_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </example_module_read>
        </resources>
    </global>
</config>

Any I have the following subdirectory structure:

Example /
- Module /
-- data / example_module_setup / data-install-0.1.0.php
-- data / example_module_setup / data-upgrade-0.1.0-0.2.0.php
-- etc / config.xml
-- sql / example_module_setup / install-0.1.0.php

However, the module does not get registered in core_resource. I've cleared var/cache before reloading the frontend.

What is wrong here?


texts:
We recently upgraded our magento 1.8.1 install to 1.9.4.1, we also changed our php version from 5.6.4 to 7.2

However we are now getting an error when looking at the product page

Uncaught DOMExeption: Failed to execute 'appendChild' on 'Node': The new child element contains the
parent.
    at klass.moveTabContentInDest

Coming from the Javascript for the Adminhtml module. This is quite a critical issue as it is stopping any edits from being made on the product's within the magento backend.

Does anyone know a way to fix this issue?

moveTabContentInDest : function(){
    for(var tab=0; tab<this.tabs.length; tab++){
        if($(this.destElementId) &&  !this.tabs[tab].contentMoved){
            var tabContentElement = $(this.getTabContentElementId(this.tabs[tab]));
            if(tabContentElement && tabContentElement.parentNode.id != this.destElementId){
                $(this.destElementId).appendChild(tabContentElement);
                tabContentElement.container = this;
                tabContentElement.statusBar = this.tabs[tab];
                tabContentElement.tabObject  = this.tabs[tab];
                this.tabs[tab].container = this;
                this.tabs[tab].show = function(){
                    this.container.showTabContent(this);
                };
                if(varienGlobalEvents){
                    varienGlobalEvents.fireEvent('moveTab', {tab:this.tabs[tab]});
                }
            }
        }
    }
    if (this.displayFirst) {
        this.showTabContent($(this.displayFirst));
        this.displayFirst = null;
    }
},


texts: CSS error in email template in magento 2

texts:
All the emails received have the following error

CSS inlining error: Warning: DOMXPath::query(): Invalid expression in /home/73299-56608.cloudwaysapps.com/qamfwwvwxj/public_html/vendor/pelago/emogrifier/Classes/Emogrifier.php on line 269

How can i resolve this error.

Check the attached image


texts: Image url converted into webp format by which image not coming on my magento 2 store

texts:
Image url converted into webp format by which image not displaying on my magento 2 store, suddenly my live website get hampered . please anyone help me how this possible my image Url changed by itself.
the current url of img tag is this
<img src="https://sarikart.com/pub/media/HomePageImage/354x375xdesigner_cat1.jpg.pagespeed.ic.MMWDNnulF3.webp" alt="" width="354" height="375">


texts: The event order when add product to cart?

texts: When the customer adds a product to the cart, what is the list of events and the order of them?


texts: Add custom block to layered navigation - best to Price

texts:
Is anyone know how I can add custom block to price filter in layered navigation?

I curently moved my block with jQuery, but what if someone add more attributes? Maybe I could add class to price filter?

$('#narrow-by-list > div:nth-child(7)').append( $('#myBlock') );


texts: How to clean or flush cache programmatically in Magento 2.3?

texts:
I have tried DI and Object Manager way to clean or flush cache but its not working for me

using DI

public function __construct(
    Context $context,
    \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList,
    \Magento\Framework\App\Cache\Frontend\Pool $cacheFrontendPool
) {
    parent::__construct($context);
    $this->_cacheTypeList = $cacheTypeList;
    $this->_cacheFrontendPool = $cacheFrontendPool;
}
$types = array('config','layout','block_html','collections','reflection','db_ddl','eav','config_integration','config_integration_api','full_page','translate','config_webservice');
foreach ($types as $type) {
    $this->_cacheTypeList->cleanType($type);
}
foreach ($this->_cacheFrontendPool as $cacheFrontend) {
    $cacheFrontend->getBackend()->clean();
}

using ObjectManager:

$obj = \Magento\Framework\App\ObjectManager::getInstance();
$indexerCollectionFactory = $obj->get("\Magento\Indexer\Model\Indexer\CollectionFactory");
$indexerFactory = $obj->get("\Magento\Indexer\Model\IndexerFactory");

// custom function for reindexing
public function reIndexing(){
    $indexerCollection = $indexerCollectionFactory->create();
    $allIds = $indexerCollection->getAllIds();

    foreach ($allIds as $id) {
        $indexer = $indexerFactory->create()->load($id);
        //$indexer->reindexRow($id); // or you can use reindexRow according to your need
        $indexer->reindexAll(); // this reindexes all
    }
}


texts: How to display custom shipping message per selected shipping option?

texts:
I want to display custom shipping message according to selected shipping method. And it's possible if custom shipping messages display on base of product attribute ?
If someone have solution for this issue, Please share with me.
Thanks


texts: Duplicate Meta Description on Product Images in Google Webmaster

texts: I am showing 185 duplicate meta descriptions on product images. All the product images have unique alt tags, how to you update the meta description for the images?


texts: is it possible to add a single child category to multiple parent categories?

texts:
I am working on Magento 1.9 and stuck on some problem my problem is that I want to add single category to multiple parent categories like the example

parent-category1

sub category1

parent-category2

sub category1

i have read many forum and article on this problem but couldn't find the solution for this problem so any one can help me in this problem. if you have any extension to solve this problem then please specify me the name of that plugin or extension


texts: addColumn with select options in generated admin field

texts:
I want to know if someone has already added a select field in a generated admin fields

Vendor/Name/Block/Adminhtml/Menu/Field/AdditionalMenu.php

<?php

namespace Vendor\Menu\Block\Adminhtml\Menu\Field;

use Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray;

/**
 * Class AdditionalMenu
 */
class AdditionalMenu extends AbstractFieldArray
{
    protected $_itemRenderer;
    /**
     * {@inheritdoc}
     */
    protected function _prepareToRender()
    {
        $this->addColumn(
            'Title',
            ['label' => __('Title'),
             'size' => '200px',
             'class' => 'required-entry']
        );
        //Option test
        /*$this->addColumn('Type',
        array('label'   => __('Type'),
              'type'    =>'options',
              'options' => array('Option 1', 'Option 2')
        ));*/
        $this->addColumn(
            'Link',
            ['label' => __('Link'),
             'size' => '200px']
        );
        $this->addColumn(
            'Ordre',
            ['label' => __('Ordre'),
             'size' => '50px',
             'class' => '']
        );
        $this->_addAfter = false;
        $this->_addButtonLabel = __('Ajouter un Menu');
    }

}


texts:
How to call Magento popup on load the page it will work on clik only

 VIP

<img src="<?php echo $this->getSkinUrl('images/proxelle/txt_1.png');?>">

<img src="<?php echo $this->getSkinUrl('images/proxelle/txt_2.png');?>">

          <form action="<?php echo $this->getUrl('proxelle/index/addme') ?>" method="post" id="proxelle">
            <input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
            <input type="text" name="fname" id="only-text" placeholder="Enter Your Name Here" required="true" autocomplete="off"/>

            <input type="email" name="email" placeholder="Enter Your Email Id Here" required="true" autocomplete="off"/>

            <input type="submit" name="Go">

<img src="<?php echo $this->getSkinUrl('images/proxelle/txt_3.png');?>">

        </form>


texts: Guest checkout with PayPal Express: How about the shipping costs?

texts:
I'm not sure whether I've understand PayPal Express completely so far.

When a guest visits a product page and clicks on the PayPal Express button (if activated), how does PayPal know how much shipping cost it has to add to the product price?

Transfers Magento the shipping rate table to PayPal?

Thank you in advance!


texts:
I want to create customer group via soap API. but I can't find any documentation regarding this.http://devdocs.magento.com/guides/m1x/api/soap/customer/customer.create.html

even does't mansion about.is there any way to do that .using soap.


texts: How can I integrate my custom module with venia theme (pwa-studio)

texts:
I want to integration venia theme (pwa) and my custom module.
But I can't find any documentation for this. No examples. No integration point in the code. Nothing.

Only https://github.com/Jordaneisenburger/fallback-studio

  I had no clue on how or where to start building my own storefront.

But I find  many vue storefront module example

https://github.com/DivanteLtd/vue-storefront/blob/master/docs/guide/modules/introduction.md

https://github.com/frqnck/awesome-vue-storefront#front-end-modules

How can I fluently add custom react component at the product page after description for example?

How can I run GraphQL query?

p.s. Which to use venia or vue storefront?


texts: magento 1.9 export all products not work

texts:
i try to export all products by using magento default "Export All Products" data profile, but it not works, when i click "Run Profile in Popup" it just loads a while and then displays

 Starting profile execution, please wait...
 Warning: Please do not close the window during importing/exporting data

there is no export_all_products.csv in my var/export folder, any ideas?


texts: Where to find the pages to modify content on magento 1.9

texts:
We have Magento 1.9 for our site. I am taking over, and I would like to make some changes on the pages of our site. It is my first time working with Magento, what I would like to know is where to find the page templates to go in my text editor and make changes accordingly.

For example I am trying to start making changes to the url below.

https://www.jauniforms.com/customer/account/login/

Thanks!


texts: Why was "cart price rule based on payment method" removed from Magento 2.1.8?

texts:
When Magento 2.0 came out, the well-known feature from Magento 1 - to add the payment method as a condition for a cart price rule - was not implemented.

Magento 2.1 added this feature. Lately we updated a system to 2.1.9 and noticed that the feature was missing again. It is still present in version 2.1.7 and I assume it has been removed in version 2.1.8.

On Github, I think this is the commit that removed the feature:
https://github.com/magento/magento2/commit/bb65d05d41f30cd6a10fdfffb10b1dd8f42d3a77#diff-6af1fa68376d90ae611de38779431624

Interesting enough, we have cart rules in place that were created with "payment method" as a condition and they are still working.

It would be nice if anyone could answer the question if I am missing something here, or if it's safe to write a small plugin for the function loadAttributeOptions() and simply add the payment method again.


texts: PHP Get Order Status name by State code?

texts:
I am working on an extension and i need an info how to get the status name by state code, is it possible ?

The picture is from the Admin's panel Order Statuses page.

How i can get the status name by state code, is it possible ?


texts:
I am developing a few modules for Magento. In one of them, I need to attach a javascript piece of code at the end (or at the head) of each page. The code works more or less like google analytics (but my module is much simpler than the mage/googleanalytics one).
Which event should I use to correctly inject the javascript code to the page source code that is being viewed?


texts: Magento media queries in platform-Responsive emails

texts:
Hi i set some @media style for mobile for emails in magento (i added style in email header head section, in email header body section, in email-inline.css , in email-non-inline.css)  but when mail sent to gmail or outlook or any other the responsive define in @media is not showing in any mobile devices it avoided @media css but when i preview email templates at admin transnational email section it looks ok with all screen.

Please help me to add responsive css For mobile devices for example i want to hide some text after all media less than 600px. I am using
@media only screen and (max-width:599px) {}  also tried with
@media only screen and (max-width: 599px), screen and (max-device-width: 550px)  and @media only screen and (max-width: 599px) but no success.


texts: Change associated Product Sku on change of configurable product attributes dropdown in detail page in Magento2

texts:
I need dynamic Associated product sku change in product detail page on change of product super attributes dropdown or swatches.

Plugins available are not free it seems. can anyone help?


texts: Magento 2: convert curl response into array

texts:
I am not able to convert magento 2 JSON response into array. Can you please help in short out this problem?

Here is my code:

$url = 'http://example.com/api/coop';
$post = [
        'firstname' => $userDetail->firstname,
        'lastname'  => $userDetail->lastname,
        'email'     => $userDetail->email,
        'password'  => $userDetail->password
    ];
$this->curlClient->post($url, $post);
$responseCurl = $this->curlClient->getBody();
print_r($responseCurl);
die();

Output:

{"coop_id":"COOP33"}

I have to use coop_id value somewhere in my logic. Thanks in advance.


texts: Magento 2 : resource name is not defined

texts:
I have my custom table and created respective models related to that.
My issue is : When I try to get collection or set data into that table that time I am getting an error

  Model collection resource name is not defined.

Please have a look in my files :
Table name : custom_test_customertest

Namespace/Modulename/Model/Test/Customertest.php

namespace Namespace\Modulename\Model\Test;
use Magento\Framework\Model\AbstractModel;

class Customertest extends AbstractModel
{
    protected function _construct()
    {
      $this->_init('Namespace\Modulename\Model\ResourceModel\Test\Customertest');
    }
}

Namespace/Modulename/Model/ResourceModel/Test/Customertest.php

namespace Namespace\Modulename\Model\ResourceModel\Test;
class Customertest extends \Magento\Framework\Model\ResourceModel\Db\AbstractDb
{
    protected function _construct()
    {
        $this->_init('custom_test_customertest', 'id');
    }
}

Namespace/Modulename/Model/ResourceModel/Test/Customertest/Collection.php

namespace Namespace\Modulename\Model\ResourceModel\Test\Customertest;

class Collection extends \Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection
{

    protected function _construct()
    {
       $this->_init(
'Namespace\Modulename\Model\Test\Customertest','Namespace\Modulename\Model\ResourceModel\Test\Customertest'
      );
    }
}

When I try to collect collection from phtml or anywhere I am getting issue:

 $objectManager = \Magento\Framework\App\ObjectManager::getInstance();
 $objectManager->get('\Namespace\Modulename\Mode\Test\Customertest')->getCollection();


texts: Magento 2 Fail to save the value of a newly added Yes/No customer attribute

texts:
The customer attribute shows up but cannot save it because there are no records about this attribute in eav_entity_attribute table, when I manually add a row for the attribute, it can be saved. How to deal with it? What was missed? Thanks.

namespace Namespace\ModuleName\Setup;

use Magento\Customer\Model\Customer;
use Magento\Customer\Setup\CustomerSetup;
use Magento\Framework\Setup\UpgradeDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
use Magento\Customer\Setup\CustomerSetupFactory;

class UpgradeData implements UpgradeDataInterface {

    /**
     * Customer setup factory
     *
     * @var \Magento\Customer\Setup\CustomerSetupFactory
     */
    private $customerSetupFactory;

    /**
     * Init
     *
     * @param \Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory
     */
    public function __construct(\Magento\Customer\Setup\CustomerSetupFactory $customerSetupFactory) {
        $this->customerSetupFactory = $customerSetupFactory;
    }

    public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) {

        $setup->startSetup();

        /** @var CustomerSetup $customerSetup */
        $customerSetup = $this->customerSetupFactory->create(['setup' => $setup]);

        $customerSetup->addAttribute(
                Customer::ENTITY, 'abc', [
            'label' => 'ABC',
            'input' => 'select',
            'type' => 'int',
            'default' => false,
            'source' => 'Magento\Eav\Model\Entity\Attribute\Source\Boolean',
            'user_defined' => true,
            'required' => true,
            'position' => 82,
            'sort_order' => 82,
            'visible' => true,
            'system' => false,
            'is_used_in_grid' => true,
            'is_visible_in_grid' => true,
            'is_filterable_in_grid' => true,
            'is_searchable_in_grid' => true,
                ]
        );

        $customerSetup->updateAttribute('customer', 'myhkt', 'is_used_for_customer_segment', '1');

        // add attribute to form
        /** @var  $attribute */

        $attribute = $customerSetup->getEavConfig()->getAttribute('customer', 'abc');
        $attribute->setData('used_in_forms', ['adminhtml_customer']);
        $attribute->save();
        $setup->endSetup();
    }

}


texts: When does Magento decide to give a guest a new visitor_id? Cart gets empty sometimes

texts: When does Magento decide to give a guest a new visitor_id? I noticed many entries in log_visitor table, and session_id often is replicated many times, and that makes cart get empty sometimes for some users.


texts: I can't see any changes in Magento homepages

texts: I'm trying to add a picture into front page ( home page ) in my eCommerce website. I'm adding the codes on the server files ( home.phtml) and when I save it nothing is happenening. even tho I've the same website installed in another server and same copy and I do same changes and it does work on the other server! I spent all day today looking for a solution and it's getting me to the point of having a heart attack :) any advice of what could be the problem ?


texts: observer does not capture place order - magento 2.0.1

texts:
I am working in simple event/observer module, but it does not work. I am trying to log the message in deubug.log when click place order button.

I have listed below what I have done

app/code/Gworks/Sms/etc/frontend/events.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
    <event name="checkout_directpost_placeOrder">
    <observer name="get_place_order" instance="Gworks\Sms\Observer\LogAddMessage"/>
    </event>
</config>

app/code/Gworks/Sms/etc/module.xml

<?xml version="1.0" encoding="UTF-8"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="Gworks_Sms" setup_version="1.0.0"/>
</config>

app/code/Gworks/Sms/Observer/LogAddMessage.php

<?php
namespace Gworks\Sms\Observer;
use Magento\Framework\Event\ObserverInterface;
class LogAddMessage implements ObserverInterface
{
    protected $_logger;
    public function __construct(
    \Psr\Log\LoggerInterface $logger, //log injection
    array $data = []
    ) {
    $this->_logger = $logger;
    //parent::__construct($data);
    }
    public function execute(\Magento\Framework\Event\Observer $observer)
    {
       $this->_logger->addDebug('getplace oreder event occured successfully!');
    }
}

app/code/Gworks/Sms/registration.php

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Gworks_Sms',
    __DIR__
);

Thanks