magento get attribute from products
//get attribute from a product based on name Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('style');
//get attribute from a product based on name Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('style');
//magento test credit card details below:- Visa: 4111111111111111 MasterCard: 5555555555554444 American Express: 378282246310005 Use any expiration date in the future and as the CVV/CVC/verification code use 123 or 000
//filter for products whose orig_price is greater than (gt) 100 $collection->addFieldToFilter(array( array('attribute'=>'orig_price','gt'=>'100'), )); //AND filter for products whose orig_price is greater than (lt) 130 $collection->addFieldToFilter(array( array('attribute'=>'orig_price','lt'=>'130'), )); //get products of…
You can search for text within a directory with the below command. Please note that . refers to the current directory grep -r "search text" . To search a file…
when you have installed the latest php 5.3 and magento 1.3 and you may get an error like: “Fatal error: Method Varien_Object::__tostring() cannot take arguments ” you need to take…
<?php require_once 'app/Mage.php'; $app = Mage::app(); ?> <?php $product = Mage::getModel('catalog/product'); $product->setSku("ABC123hhsgfsgg"); $product->setName("Type 7 Widget"); $product->setDescription("This widget will give you years of trouble-free widgeting."); $product->setShortDescription("High-end widget."); $product->setPrice(70.50); $product->setTypeId('simple'); $product->setAttributeSetId(4); //…
http://www.hscripts.com/scripts/JavaScript/index.php
Just change settings in the configuration file www/app/code/core/Mage/Core/etc/system.xml Set sections>dev>debug>fields>template_hints>show_in_default to 1 and set sections>dev>debug>fields>template_hints_blocks>show_in_default to 1 too