magento-1.6

Overriding/Extending the Magento core javascript files

邮差的信 提交于 2019-11-28 15:41:06
问题 Last days as a result of some customer complains and discussion with our marketing guys I've got a request to change the default behavior of the configurable products options. They asked me to remove the + $xx.xx from the options drop-down as it is confusing the customers/visitors and just leave the available options without displaying the price change. Fair enough from their point of view, but it is a bit tricky from developers point of view I think. The site is running Magento CE 1.6.2, and

I can't sort product collection by category id

女生的网名这么多〃 提交于 2019-11-28 10:58:58
问题 I have a few categories: guys, ladies, men, women and offers. Every product is assigned to guys, ladies, men OR women categories. And some products are assigned to "offers" category. I need to retrieve every "offers" products but sort by the others categories, I mean: OFFERS -> guys products -> ladies products -> men products -> women products $collection = Mage::getResourceModel('catalog/product_collection') ->addAttributeToSort('category_ids', 'ASC') ->addAttributeToSelect(array('name',

Cannot update Stock Item Quantity for a Product in Magento 1.6.2

寵の児 提交于 2019-11-27 16:54:52
问题 I am trying to update the stock quantities of products in Magento from within a script. I load the product, set the stock quantity, and save - but the quantity remains unchanged. // get stock data $stockData = $product->getStockItem(); printf(PHP_EOL.'Stock: qty=%d, instock=%s, man_stock=%s, use_cfg_man_stock=%s'.PHP_EOL, $stockData->getData('qty'), $stockData->getData('is_in_stock'), $stockData->getData('manage_stock'), $stockData->getData('use_config_manage_stock') ); // prints out qty=0,

Magento: limit product max quantity to 1 per order. quantity 2 = 2 orders

自闭症网瘾萝莉.ら 提交于 2019-11-27 07:15:49
问题 Is it anyhow possible to limit specific products in Magento to a max quantity of one per order? This means the user can only order one product at a time. If he wants to order the product twice he has to do a second order. This is very important for me for the later order workflow. Thx for your help, I appreciate it! Kind regards, Manu 回答1: Yes, you can limit the maximum quantity of a product in the shopping cart by editing the value on the Inventory tab when editing a product. See screenshot