This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//grab the category | |
$category = Mage::registry('current_category'); | |
//if category exists see if it is a parent category | |
if ($category) | |
{ | |
$category = $category; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//THIS SCRIPT JUST INITIALS THE PROFILE TO BE RUN VIA MAGENTO ADMIN "RUN PROFILE IN POPUP". Its the same thing as click just via this file that you can run via cron | |
$profileId = 1; // SYSTEM - IMPORT/EXPORT - ADVANCED PROFILES <-- you need to go into your magento admin and grab the exact profile ID | |
ini_set('memory_limit', '-1'); | |
require_once 'app/Mage.php'; | |
umask(0); | |
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ul id="manufacturers"> | |
<?php | |
$attribute = Mage::getSingleton('eav/config')->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'manufacturer'); | |
foreach ($attribute->getSource()->getAllOptions() as $option) | |
{ | |
if ($option['label']) | |
{ | |
//$cleanlink = str_replace(array(" ","'","_","."),array("-","","-",""),strtolower($option['label'])); | |
$urlKey = str_replace("'", '', $option['label']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRUNCATE TABLE `catalog_product_bundle_option`; | |
TRUNCATE TABLE `catalog_product_bundle_option_value`; | |
TRUNCATE TABLE `catalog_product_bundle_selection`; | |
TRUNCATE TABLE `catalog_product_entity_datetime`; | |
TRUNCATE TABLE `catalog_product_entity_decimal`; | |
TRUNCATE TABLE `catalog_product_entity_gallery`; | |
TRUNCATE TABLE `catalog_product_entity_int`; | |
TRUNCATE TABLE `catalog_product_entity_media_gallery`; | |
TRUNCATE TABLE `catalog_product_entity_media_gallery_value`; | |
TRUNCATE TABLE `catalog_product_entity_text`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//---------------------- GET THE PRODUCTS | |
$products = Mage::getModel ( 'catalog/product' )->getCollection (); | |
$products->addAttributeToFilter ( 'status', 1 ); //enabled | |
$products->addAttributeToFilter ( 'visibility', 4 ); //catalog, search | |
$products->addFieldToFilter(array( | |
array('attribute'=>'cost','gt'=>0))); | |
$products->addFieldToFilter(array( | |
array('attribute'=>'type_id','eq'=>'simple'))); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach ( $prodIds as $productId ) { | |
//echo '. '; | |
//flush(); | |
//echo 'Loop start: '.memory_get_usage(false).'<br>'; | |
//flush(); | |
$product = Mage::getModel('catalog/product')->load ( $productId ); | |
//check stock info so we dont add a product thats out of stock | |
//also check if upc is valid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Import Function */ | |
function is_upca($upc) | |
{ | |
if (strlen((string)$upc)==12) | |
{ | |
//commence extra steps | |
if (preg_match('/[a-z]/i',$upc)) | |
{ | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$description .= $model . ". The " . $make . " " . $model . " catalytic converter meets both EPA requirements, as well as OEM vehicle manufacture standards. This catalytic converter is built to last, ensuring that your " . $year . " " . $make . " " . $model . " emissions are within EPA regulations."; | |
$TierI[$_Row]['description'] = $description; | |
$TierI[$_Row]['meta_keywords'] = $year . " " . $make . " " . $model . " Catalytic Converter"; | |
$TierI[$_Row]['meta_description'] = "This " . $year . " " . $make . " " . $model . " Catalytic Converter is designed to last while meeting both EPA requirements, as well as OEM vehicle manufacture standards."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//mysql for truncating all tables | |
TRUNCATE `log_customer`; | |
TRUNCATE `log_quote`; | |
TRUNCATE `log_summary`; | |
TRUNCATE `log_summary_type`; | |
TRUNCATE `log_url`; | |
TRUNCATE `log_url_info`; | |
TRUNCATE `log_visitor`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* This module creates a custom block which users are not allowed to be able to alter*/ | |
/** | |
* Implements hook_help. | |
* | |
* Displays help and module information. | |
* | |
* @param path |
OlderNewer