In both catalog and product page the “add to cart” button doesn’t load. I get an infinite loader instead of the “add to cart” button. Does anyone know what this could be?? I have never encoutered this problem before.
Magento
I wanted to create a new Scalar type as my output is having both string and array. I want my response in the below format. "custom_attributes": [ { "attribute_code": "color", "value": "red" }, { "attribute_code": "size", "value": "M" }, { "attribute_code": "category_ids", "value": [ "3", "333" ] } ]
I want to show the custom options on popup on product page I have created the popup. Can anyone help me populate it with the custom options? Any help would be appreciated. Thank you.
I’m with a need to override admin area template /public_html/vendor/magento/module-customer/view/adminhtml/templates/tab/view/personal_info.phtml I tried doing that with following.Just for testing whether overriding works, I am trying to change the font color of address section in personal info tab. The attempted overriding does not work and I do appreciate if someone guide me […]
I am able to add a button to Product Listing page. But how do I add onclick to it? This is how I am adding the button: $subject->addButton('amazon_sync_button',[ 'label' => __('Sync with Amazon'), 'id' => 'amazon-sync-button', 'on_click' => 'setLocation('' . $this->sync() . '')' ]); I have created a function sync(), […]
I want add variation dropdown instead of multiple div swatch option. I am not getting how to do in grid.phtml. Below is the code swatch option display <?= $block->getProductPriceHtml($_item, $type) ?> <div class="pro-weight"> <?php if ($_item->isSaleable()): ?> <?php $postParams = $block->getAddToCartPostParams($_item); ?> <?php echo $block->getProductDetailsHtml($_item); ?> <?php endif; ?> </div> […]
Can you please guide me on this issue please. After install elasticsearch install successfully But while try this url [ http://localhost:9200 ] Geeting this issue after run [ curl http://localhost:9200 ] Error: curl: (52) Empty reply from server elasticsearch.yml # ======================== Elasticsearch Configuration ========================= # # NOTE: Elasticsearch comes with […]
In magento-1.9 I would call $Products = Mage::getResourceModel('catalog/product_collection'); $products->setFlag('require_stock_items', true); And this would add the StockItem to every product in the collection. I can’t see how to do this in M2, if I instantiate a MagentoCatalogModelResourceModelProductCollectionFactory and call MagentoCatalogInventoryModelResourceModelStockStatus->addStockDataToCollection it will error out with "0": "You cannot define a correlation […]