magento

Magento Reports - Products - Products Ordered issue: Item (Mage_Catalog_Model_Product) with the same id already exist

点点圈 提交于 2020-01-12 03:39:25
问题 The issue: In Magento admin panel, when generating report via Reports - Products - Products Ordered, an error occurs: Item (Mage_Catalog_Model_Product) with the same id "45" already exist #0 /home/glassesm/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(236): Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Product)) #1 /home/glassesm/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(964): Mage_Eav_Model_Entity_Collection_Abstract-

How to remove all catalog products in Magento

不问归期 提交于 2020-01-12 02:28:07
问题 I've trying to import a products list to magento. In the firsts test, I got success, but the products were not showing up in back or front office. After redo the import process few times, I found out that I have the imported products on database, but, still not showing. If I access de Catalog > Manage Categories > Default Category -> Category Products I may see the imported products. Later on, I found a error in my import file ... and I may correctly import products instead .... I have found

Add bundle product to cart without having to specify the options

烈酒焚心 提交于 2020-01-11 19:54:33
问题 I have bundle products with 3 checkboxes checked as default. I want to add a bundle product from the page category list ( list.phtml ) without having to specify the options. How can I do this? 回答1: My project needed to only show a single line for a bundle product, hidden options default selected and purchased when buying the bundle. The product had be buyable from the category view. Bundle config: Bundle with dynamic price Options are configured to be required, default values and radio

How to join collections in Magento?

这一生的挚爱 提交于 2020-01-11 18:50:38
问题 I am trying to join a custom collection with products to show the product name (not just the id) in the admin grid widget. So far i can't find the correct syntax. I am able to retrieve the products with the product name by the following: Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('name'); and i can retrieve my custom collection with: Mage::getResourceModel('xyz_mymodule/model_collection'); How do i join the two so that the module collection is the primary

How to join collections in Magento?

房东的猫 提交于 2020-01-11 18:49:26
问题 I am trying to join a custom collection with products to show the product name (not just the id) in the admin grid widget. So far i can't find the correct syntax. I am able to retrieve the products with the product name by the following: Mage::getModel('catalog/product')->getCollection()->addAttributeToSelect('name'); and i can retrieve my custom collection with: Mage::getResourceModel('xyz_mymodule/model_collection'); How do i join the two so that the module collection is the primary

Setting Custom Options while adding a product to cart via SOAP in Magento

走远了吗. 提交于 2020-01-11 10:24:14
问题 I am trying to use the shoppingCartProductAdd SOAP API to add a product with Custom Options to cart. Below is the array I am passing for the products parameter. I've a custom option id 1 for which the selected value id in the dropdown is 2. (you can view the product here) array (size=1) 0 => array (size=3) 'product_id' => int 25 'qty' => int 1 'options' => array (size=1) 1 => int 2 This product gets added to the cart but when I retrieve the cart details / totals, it does not reflect the

How can I override a Magento controller?

懵懂的女人 提交于 2020-01-11 08:46:11
问题 I need to check the validity of a coupon code on the checkout/cart page with server-side code. Magento already ships with a similar check in place. However, I need to add one to see if a user is connected or not: what would be the best way to extend/override that action in Magento? I know I can copy the controller PHP file to the /app/code/local/ folder tree, but I'm wondering whether there's a better way to do it. 回答1: Anything besides modifying the core is good in my opinion. With that said

Magento 1.7 Filter products by multiple categories

大兔子大兔子 提交于 2020-01-11 07:23:06
问题 I am looking for a way to filter the products being returned on a category page by the current category AND an optional sub-category. Every solution I have seen so far has been 'show products that are in category-a OR category-b'. Which file do I need to edit to filter a product collection by an additional, optional category id passed as a query parameter (e.g. ?catfilter=32 )? 回答1: look here: http://vibrantdrive.com/how-to-filter-magento-products-using-2-or-more-category-filters/ To get

Magento: Increase “Qty” upon cancel a shipped order

不打扰是莪最后的温柔 提交于 2020-01-11 06:57:29
问题 I'm on Magento 1.7.0.2. I'm using "Cash On Delivery" as my payment method.I'll tell you exactly the steps That i follow on any order. When an order is placed(Qty decreased 1 item), I create a shipment for it and if customer paid the order grand total price. I create an invoice for that order. My problem, If an order is placed(Qty decreased 1 item), I create a shipment for this order. If the customer refused to pay, I open this order and "Cancel" it and on this case the "Qty" doesn't increase

Getting pager to show on magento list

孤街浪徒 提交于 2020-01-11 06:54:20
问题 We currently have a quote page which lists all existing quotes that we would like to show the pager. We have the following code in the List page which we've added the call to the pager but it doesn't appear to be showing frontend at all. I've also added the history page which displays a list with a pager as an example of a working page we are trying to emulate. Can anyone point us in the right direction as we appear to be missing something List <?php $_quotation = $this->getQuotations();?> <