-
Open a browser
# start an instance of firefox with selenium-webdriver $browser_type = 'firefox' $host = 'http://localhost:4444/wd/hub'
$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);
| <?php | |
| $attribute_code = 'fashion_colour'; | |
| $attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', $attribute_code); | |
| $options = $attribute->getSource()->getAllOptions(); | |
| $optionsDelete = array(); | |
| $optionsValue = array(); | |
| foreach($options as $option) { | |
| if (in_array($option['label'], $optionsValue)) { | |
| $optionsDelete['delete'][$option['value']] = true; | |
| $optionsDelete['value'][$option['value']] = true; |
| SELECT * FROM ( SELECT | |
| ce.sku, | |
| ea.attribute_id, | |
| ea.attribute_code, | |
| CASE ea.backend_type | |
| WHEN 'varchar' THEN ce_varchar.value | |
| WHEN 'int' THEN ce_int.value | |
| WHEN 'text' THEN ce_text.value | |
| WHEN 'decimal' THEN ce_decimal.value | |
| WHEN 'datetime' THEN ce_datetime.value |
| <?php | |
| /** | |
| * Copy all images from $productSrc to $productDest | |
| * | |
| * @param Mage_Catalog_Model_Product $productSrc | |
| * @param Mage_Catalog_Model_Product $productDest | |
| */ | |
| public function copyProductImages(Mage_Catalog_Model_Product $productSrc, Mage_Catalog_Model_Product $productDest) | |
| { | |
| $images = array(); |
| <?xml version="1.0"?> | |
| <config> | |
| <frontend> | |
| <events> | |
| <!--disable logs--> | |
| <controller_action_predispatch> | |
| <observers><log><type>disabled</type></log></observers> | |
| </controller_action_predispatch> | |
| <controller_action_postdispatch> | |
| <observers><log><type>disabled</type></log></observers> |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |