A few clients have asked for some modifications to the existing Magento and WordPress extension to support additional features, so we are passing them on to you! New updates include: META tag support No more 301 redirects for downloadable content Improved performance META tag support Magento 1.4 Support Minor bug fixes Integrate WordPress and Magento now! http://www.sonassi.com/knowledge-base/magento-knowledge-base/simple-and-effective-wordpress-and-magento-integration/
Category Archives: Magento
Quick script to mass enable categories in Magento
Just another easy one if you are looking to enable categories by ID – we usually incorporate this script into our product insertion API, so that it enables a category automatically for a product upon insertion. But it can also be used standalone. This script would be ideal alongside our export Magento category ID script 1 Create a CSV with a maximum of 1 column, with just the Magento category ID. Then save it to ./app/var/import/categoriesToEnable.csv. For examples sake, we will use, "1" "13" "15" 2 Copy the code below into a new file, ./quick_enableCats.php <? define(‘MAGENTO’, realpath(dirname(__FILE__))); require_once MAGENTO . ‘/app/Mage.php’; umask(0); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); $file = fopen(MAGENTO . "/var/import/categoriesToEnable.csv", ‘r’); while (($line = fgetcsv($file)) !== FALSE) { $cats = explode(",",$line[1]); foreach ($cats as $cat) { $newcats[$cat] = true; } } // Activate the categories it is in foreach ($newcats as $cat=>$value) { if ($value && !empty($cat)) { try { $_category … Continue reading
Mass update stock levels in Magento – FAST
This isn’t ground-breaking code, but rather just using some core code in a rather stripped out manner. As we’re not big fans of Magento data flow here, we perform most of our stock and catalogue updates using external scripts to Mage::app. We have been trickling elements of these out to the wider world so you can also benefit from them. Managing large catalogues and updating stock levels regularly can be mission impossible in Magento, but not any more. With this script – we processed 120,000 stock updates in the blink of an eye. Next time we’ll teach you how to import products at 0.7 seconds each … 1 Create a CSV with a minimum of 2 columns, the SKU and any of the following, qty min_qty use_config_min_qty is_qty_decimal backorders use_config_backorders min_sale_qty use_config_min_sale_qty max_sale_qty use_config_max_sale_qty is_in_stock use_config_notify_stock_qty manage_stock use_config_manage_stock stock_status_changed_automatically type_id Then save it to ./app/var/import/updateStockLevels.csv. For examples sake, we will … Continue reading
Display Attributes on Invoice or Packing Slip in Magento
Add this to Mage/Sales/Model/Order/Pdf/Items/Invoice/Default.php, replace ATTRNAME as appropriate. public function draw() { … $product = Mage::getModel(‘catalog/product’)->loadByAttribute(‘sku’, $this->getSku($item), array(‘ATTRNAME’)); if ($product) { $lines[0][] = array( ‘text’ => Mage::helper(‘core/string’)->str_split($product->getData(‘ATTRNAME’), 15), ‘feed’ => 305 ); } Then add this to Mage/Sales/Model/Order/Pdf/Invoice.php, replace ATTR_TITLE as appropriate and OFFSET with the left offset. /* Add table head */ … $page->drawText(Mage::helper(‘sales’)->__(‘ATTR_TITLE’), OFFSET, $this->y, ‘UTF-8′); if (!empty($settings['table_header'])) { … $page->drawText(Mage::helper(‘sales’)->__(‘ATTR_TITLE’), OFFSET, $this->y, ‘UTF-8′); There is no definitive solution as you need to change a few other details to limit column widths in other areas depending on where you are trying to put your values (ie. description is usually made narrower and forced to line-wrap). Referenced from: http://www.magentocommerce.com/boards/viewthread/18142/P15/#t201627
WordPress and Magento integration extension
Try WordPress Deluxe for a fully integrated solution for Magento CE and EE You can now obtain a copy of the Magento WordPress Deluxe Extension. Our store isn’t live yet, so we are taking orders via email at the moment. The price is £100 including free installation (theming is not included). Buy WordPress Deluxe now! Otherwise, here’s the old free version We’re not trying to re-invent the wheel here, nor are we going into any depth of connecting the authentication modules. From a front-end standpoint, the two “elements” wordpress and magento are essentially one – but all administration is carried out via either separate admin. With this extension, it is easy to facilitate your magento wordpress integration. Where our solution works better than the others (Lazzymonks or ActiveCodeline), it actually allows the clean search engine optimised URL’s from WordPress to be used in Magento’s breadcrumbs and address bar. It also … Continue reading