Archive: magento development

 

I’m new to Magento, so sry if it’s a newbie question Basically there is a block declared as follows in a layout.xml file: <block type=”checkout/cart” name=”checkout.cart”> <action method=”setCartTemplate”><value>checkout/cart.phtml</value></action> <action method=”setEmptyTemplate”><value>checkout/cart/noItems.phtml</value></action> <action method=”chooseTemplate”/> <action method=”addItemRender”><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action> <action method=”addItemRender”><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/item/default.phtml</template></action> <action method=”addItemRender”><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/item/default.phtml</template></action> I would like to override <action method=”addItemRender”><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/item/default.phtml</template></action> with a custom template. Since a method is being called [...]



 

I am developing a store with magento … I need to create some “stamps” to the Lodge as: New Product Only Today Free Shipping The easiest would be using attributes right? How do I attribute to use Yes / No and when set to Yes, display the image, and when set to No, the image [...]



 

I created a static navigation menu in my header.phtml file. <li><a href=”/about.html”> about</a></li> <li><a href=”/store.html”>store</a></li> etc.. How do I add the class “active” to the list item if the page is active? Thanks, -Sam Create an "actIve" state for static Magento nav Possibly Related Posts: How to call Magento block in phtml template? Magento – [...]



 

Consider this situation where we have one product “Laptop adapter” and its stock as shown in admin panel is 10. If a user selects this “Laptop adapter” and chooses quantity 20, Magento will give out a warning message like “Requested quantity for *** is not available” and adds this product count 20 to the shopping [...]



 

website – http://www1.internetvoipphone.co.uk/ Note – http://www.internetvoipphone.co.uk/ uses V1.3.2, www1 address is our V1.6 dev site before going live so please only look at that one. Issue – when a user logs in then browses back to a product page they switch from https back to http which in turn logs them out, we cant find [...]



 

I have been trying to follow a tutorial for creating a custom RSS feed with mixed success. I have followed it to a T, except that I only use the list and catalog_random block overrides instead of all the other ones that the tutorial references. My problem is that the block module is not triggered. [...]



 

I have created an email template for a custom module, placed the file in app/locale/en_US/template/email and configured it in my module config XML file. Now I want to retrieve that template in a controller through code. I have tried : $emailTemplate = Mage::getModel(‘core/email_template’)->loadByCode(‘custom_template’); But it returns a NULL email template. My module email template config [...]



 

I am using this code to display (on the frontend) all assigned attributes of a product in Magento: <?php if ($_product->getData(‘metal’)): ?> <?php echo nl2br($_product->getResource()->getAttribute(‘metal’)->getFrontend()->getValue($_product )) ?> <?php endif; ?> I need to separate each item with a bullet point • and a break <br/>. How would I edit this code to reflect those changes? [...]



 

I have a block on my front page that is grabbing the two newest products with a custom product image called image_feature_front_right. I use this code as the query: $_helper = $this->helper(‘catalog/output’); $_productCollection = Mage::getModel(“catalog/product”)->getCollection(); $_productCollection->addAttributeToSelect(‘*’); $_productCollection->addAttributeToFilter(“image_feature_front_right”, array(“notnull” => 1)); $_productCollection->addAttributeToFilter(“image_feature_front_right”, array(“neq” => ‘no_selection’)); $_productCollection->addAttributeToSort(‘updated_at’, ‘DESC’); $_productCollection->setPageSize(2); I am able to get: the image: echo [...]



 

I am trying to set up 2 sites under 1 magento installation. I used the following guide and creating 2 root categories: http://www.terranetwork.net/blog/2011/11/magento-multi-store-on-shared-cpanel-hosting-with-parked-domains/ The missing code from the .htaccess section of the guide is: SetEnvIf Host .example. MAGE_RUN_CODE=example SetEnvIf Host .example. MAGE_RUN_TYPE=website It is working good however the shopping cart isn’t shared between both sites. [...]