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
/** | |
* Generate campaign codes | |
* @param type $cuponRuleId | |
* @param type $nbr | |
* @param type $prefix | |
* @param type $suffix optional | |
* @return type | |
*/ | |
public function generateCampaignCode($cuponRuleId, $nbr, $prefix, $suffix = '') { | |
$rule = Mage::getModel('salesrule/rule')->load($cuponRuleId); // Get the rule in question |
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
<script type="text/javascript"> | |
jQuery(document).ready(function ($) { | |
var minHeight = 0; | |
$('.macro-env-images li img').each(function (index) { | |
height = $(this).height(); | |
console.log(index + ": " + $(this).height()); | |
if (index === 0) { | |
minHeight = height; | |
} | |
if (height > 0 && height < minHeight) { |
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 | |
//loop through configurable prods children and get a custom attribute articlegroup | |
$_product = $this->getProduct(); | |
$productType = $_product->getTypeID(); | |
$articleGroup = ''; | |
if ($productType == 'configurable') { | |
$childProducts = Mage::getModel('catalog/product_type_configurable')->getChildrenIds($_product->getID()); | |
foreach ($childProducts[0] as $childId => $value) { | |
$child = Mage::getModel('catalog/product')->load($childId); | |
$articleGroup = $child->getArticlegroup(); |
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 | |
/** | |
* allActiveCategories.php | |
* | |
* Gets all active catgories and writes them to a file "categories.csv" | |
* Put this in your magento 1 webroot and run from your browser | |
* krillo | |
*/ | |
require __DIR__ . '/app/Mage.php'; | |
Mage::app(Mage_Core_Model_App::ADMIN_STORE_ID)->setUseSessionInUrl(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
<?php | |
$this->startSetup(); | |
$this->addAttribute('catalog_category', 'inkclub', array( | |
'group' => 'General Information', | |
"type" => "int", | |
"backend" => "", | |
"frontend" => "", | |
"label" => "Inkclub", | |
"input" => "select", | |
"class" => "", |
NewerOlder