magento-1.7

How to change configurable product main image by associated product image based on color and size attributes?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 04:44:21
I am using configurable product with size and color attributes. I want to change the main-image on configurable-product view as per the options chosen Like If I choose red-color then image of associated-product which has red color attribute value should display on main-image as soon as I choose the option. How can I do that?? Thank you... I have found one solution for this problem for which I am working... There is one block at \app\code\core\Mage\Catalog\Block\Product\View\Type\Configurable.php . 1) Extend this block or just add "Mage\Catalog\Block\Product\View\Type\Configurable.php" to "\app

Why does Magento keep only the first 1000 products in a category, after saving the category?

孤街醉人 提交于 2019-12-03 04:22:45
问题 Using Magento's back-office, after saving a category which was linked to many products, only the first 1000 products (or 2000, or x000, depending on host configuration) are kept. All other category/product links are deleted from the catalog_category_product table in the database. This occurs even though no checkboxes have been unchecked in the products grid (Category Products tab). No error message is displayed or logged. Tracing data posted from the browser to the server doesn't reveal any

Magento: Detect if admin is logged in in frontend pages

你。 提交于 2019-12-03 01:19:09
I have created a magento extension. I want to implement access to the extension. The extension creates a page in frontend and i want only admin to access that page. So basically i need something that would detect that if admin is logged in in frontend pages. I have tried several solution but noting seem to work . if(Mage::getSingleton('admin/session', array('name' => 'adminhtml'))->isLoggedIn()) echo 'logged in'; else echo 'not logged in'; Check on frontend if admin is logged in Mage::getSingleton('core/session', array('name'=>'adminhtml')); $adminSession = Mage::getSingleton('admin/session');

Magento: Get product price given a customer group

女生的网名这么多〃 提交于 2019-12-02 19:50:26
On magento 1.7 I created a promotional price rule of 20% discount for "special members" customer group. I'd like to display both prices. I thought there would be something like $_product->getPriceByCustomerGroup( $groupId ); Goal (not logged in): Regular price: $10.99 Member price: $5.99 (member logged in): Regular price: $10.99 Member price: $5.99 Ok, bit of a muck around, but I think I have it. You can grab the price for the specific group id (3 in the case below) by calling setCustomerGroupId for the product. The only caveat is that once you call the setCustomerGroupId function you cannot

Exporting order details magento

最后都变了- 提交于 2019-12-02 18:38:54
I am looking to export order information for all the orders from a magento system i want to migrate from. These are the fields I require Order_id, sku, item_quantity, item_price, order_total_amount, Created_at, Billing_address, Billing_city, billing_state, billing_country, billing_zipcode, billing_customer_name, billing_customer_mobile, billing_customer_email, shipping_address, shipping_city, Shipping_state, shipping_zipcode, Shipping_country, shipping_charge, shipping_customer_name, shipping_customer_mobile, order_status I have tried a few free extensions but they do not solve my purpose. It

Why does Magento keep only the first 1000 products in a category, after saving the category?

只谈情不闲聊 提交于 2019-12-02 17:37:39
Using Magento's back-office, after saving a category which was linked to many products, only the first 1000 products (or 2000, or x000, depending on host configuration) are kept. All other category/product links are deleted from the catalog_category_product table in the database. This occurs even though no checkboxes have been unchecked in the products grid (Category Products tab). No error message is displayed or logged. Tracing data posted from the browser to the server doesn't reveal any missing product IDs, but even if you check more products on the back-office grid, when finally saving

Magento- How can i add a new custom block in product details page using module

谁都会走 提交于 2019-12-02 06:59:39
I am doing a magento customaization site, I need to add the products addtional attributes like it's type,version etc .I am new to magento , How can i add the new custom block to product details page. I have created a module , and i am using below coding. app\code\local\SmartGrowth\CompatibleWith\Block\compatible.php class SmartGrowth_CompatibleWith_Block_CompatibleWith extends Mage_Catalog_Block_Product_View { protected function _prepareLayout() { //$this->getProduct()->setName($this->getProduct()->getPrice()); $this->getProduct()->setName($this->getProduct()->getShortDescription()); parent::

Fatal error: Call to a member function toOptionArray() on a non-object in Magento admin

偶尔善良 提交于 2019-12-02 06:06:02
问题 When I click on Shipping Methods tab under Magento system->configuration->SALES tab I am faced with the following error: Fatal error: Call to a member function toOptionArray() on a non-object in D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463 The most astounding thing is that this is a fresh installation of Magento. Can anyone tell me how can I remove this error? 回答1: Add to config.xml <global> <models> <stockindicator> <class>Namespace_ModuleName

Magento Catalog ProductController rewrite

久未见 提交于 2019-12-02 04:55:31
I try to override the magento Mage\Catalog\controllers\ProductController.php with a module. In my module i try this: \etc\config.xml <global> <rewrite> <aion_fbpage_catalog_productcontroller> <from><![CDATA[#^catalog/product/#]]></from> <!-- Mage_Catalog_ProductController --> <to>fbpage/catalog_product/</to> <!-- Aion_FbPage_Catalog_ProductController --> </aion_fbpage_catalog_productcontroller> </rewrite> </global> <frontend> <routers> <fbpage> <use>standard</use> <args> <module>Aion_FbPage</module> <frontName>fbPage</frontName> </args> </fbpage> </routers> </frontend> \controllers\Catalog

Fatal error: Call to a member function toOptionArray() on a non-object in Magento admin

青春壹個敷衍的年華 提交于 2019-12-02 00:30:14
When I click on Shipping Methods tab under Magento system->configuration->SALES tab I am faced with the following error: Fatal error: Call to a member function toOptionArray() on a non-object in D:\xampp\htdocs\magento\app\code\core\Mage\Adminhtml\Block\System\Config\Form.php on line 463 The most astounding thing is that this is a fresh installation of Magento. Can anyone tell me how can I remove this error? Add to config.xml <global> <models> <stockindicator> <class>Namespace_ModuleName_Model</class> </stockindicator> </models> </global> Following this tutorial solve the problem => http://kb