The docs https://devdocs.magento.com/guides/v2.4/howdoi/checkout/checkout_new_field.html they describe adding a new field to the checkout form. The first step is to get the field onto the form and they do this using a plugin for the checkout block’s layout processor. Instead of manipulating the layout object directly in memory via a plugin, why […]
Magento1
Following are the commands i run ~/www/magento2 > composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento2 bin/magento setup:install --base-url=http://localhost/magento2/ --db-host=localhost --db-name=magento --db-user=root --db-password=Glassofwater_1 --admin-firstname=Magento --admin-lastname=Admin --admin-email=user@example.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=PKR --timezone=America/Chicago http://localhost/magento2/ is point to /Users/shanali/www/magento2 It always show 404 error on apache2. I’m using Mac os monetory. What do you suggest, i […]
I have custom shipping method but I would like to return false when tablerates is appear in Checkout page. Anyway to check the condition?
I`m searching on my website, for example, Black jackets, then it will show me all products that name in have word jacket + black I wanna show only products names complete match Black jackets how can do it?
I have a view model with a method for returning the category names from the current_product (Works in product view page). However it returns null when being used in the catalog view page (catalog_category_view.xml). ViewModel: namespace TheCompanyTheappViewModel; use MagentoFrameworkViewElementBlockArgumentInterface; use MagentoFrameworkViewElementTemplate; /** * Gets current products Categories */ class CategoryLogic […]
submitForm: function (form) { //this.ajaxSubmit(form); var popup = $('<div class="add-to-cart-modal-popup"/>').html($('.page-title span').text() + '<span> has been added to cart.</span>').modal({ modalClass: 'add-to-cart-popup', title: $.mage.__("Popup Title"), buttons: [ { text: 'Continue Shopping', click: function () { this.closeModal(); } }, { text: 'Add To Cart', click: function () { this.ajaxSubmit(form); //return false; //window.location = […]
I want product current stock. That’s why I have used below code. But every time I got the initial stock. I have changed the stock manually from magento 2 admin. But it shows the same. $stockManager = $objectManager->get('MagentoCatalogInventoryModelStockRegistry')->getStockItem($item->getId()); print_r($stockManager->getData()); { item_id: "8", product_id: "8", stock_id: "1", qty: "50.0000", min_qty: "0.0000", […]
I have an event observer listening on checkout_cart_product_add_after which works when adding products to the cart from the product, category, and wishlist pages, but when adding products to the cart from the B2B requisition list that event is not fired. I haven’t been able to find anything as to why […]
I have a site that uses 1 column and 2 column layouts for category pages (some pages are 1 column, others are 2 column) I made a change to the catalog_category_view.xml to update the layout of the 1 column pages, but it didn’t have the intended effect on the 2 […]