Posts

Showing posts from April 25, 2019

Magento2 - add sales order custom attribute in checkout with validation in shipping section

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 0 I want to add 3-4 custom sales order attribute in checkout page in shipping section with shipping validation, attributes like text,checkbox. magento2 checkout event-observer share asked 1 min ago Anas Mansuri Anas Mansuri 31 10 add a comment  | 

How to get Category Id of current product?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 7 2 I have get the current product category id on product details page. I have used some method like : $_product = Mage::getModel('catalog/product')->load(prodId); $ids = $_product->getCategoryId(); $cat = Mage::getModel('catalog/product')->setId($ids); but its not work as i want. $products = Mage::getResourceModel('reports/product_collection') ->addAttributeToSelect('*') ->setStoreId($storeId) ->addStoreFilter($storeId) ->addViewsCount() ->addCategoryFilter($cat) ->setPageSize($productCount); but its return some times this error Fa