Category: magento

magento

Programmatically assign products to configurable

Programmatically assign products to configurable Version 1, last updated by lbernard at 2010-12-29 <?php define('MAGENTO', realpath('/var/www/magento')); ini_set('memory_limit', '128M'); require_once MAGENTO . '/app/Mage.php'; Mage::app(); $title = 'Test Video'; $description = 'Test Video'; $bodyContent='This is a test video'; $itemNum='testVideo2.1'; $price='129.95'; $product = Mage::getModel('catalog/product'); $product->setTypeId('configurable');  // $product->setTaxClassId(0); //none $product->setWebsiteIds(array(1));  // store id $product->setAttributeSetId(26); //Videos Attribute Set Id /*    Media Format Values <option value="6">dvd</option>7 <option value="5">vhs</option> */ $product->setSku($itemNum); $product->setName($title); $product->setDescription($description); $product->setInDepth($bodyContent); $product->setPrice($price); $product->setShortDescription(ereg_replace("n","",$description)); $product->setWeight(0); $product->setStatus(1); //enabled $product->setVisibilty(4); //catalog and search...

Issue Magento, magento

magento contact form handle

<contacts_index_index translate="label"> <label>Contact Us Form</label> <reference name="root"> <action method="setTemplate"><template>page/2columns-right.phtml</template></action> <action method="setHeaderTitle" translate="title" module="contacts"><title>Contact Us</title></action> </reference> <reference name="content"> <block type="core/template" name="contactForm" template="contacts/form.phtml"/> </reference> </contacts_index_index>

magento

delete order test

SET FOREIGN_KEY_CHECKS=0; TRUNCATE `sales_flat_creditmemo`; TRUNCATE `sales_flat_creditmemo_comment`; TRUNCATE `sales_flat_creditmemo_grid`; TRUNCATE `sales_flat_creditmemo_item`; TRUNCATE `sales_flat_invoice`; TRUNCATE `sales_flat_invoice_comment`; TRUNCATE `sales_flat_invoice_grid`; TRUNCATE `sales_flat_invoice_item`; TRUNCATE `sales_flat_order`; TRUNCATE `sales_flat_order_address`; TRUNCATE `sales_flat_order_grid`; TRUNCATE `sales_flat_order_item`; TRUNCATE `sales_flat_order_payment`; TRUNCATE `sales_flat_order_status_history`; TRUNCATE `sales_flat_quote`; TRUNCATE `sales_flat_quote_address`; TRUNCATE `sales_flat_quote_address_item`; TRUNCATE `sales_flat_quote_item`; TRUNCATE `sales_flat_quote_item_option`;...