The first step that you should do to resolve this bug is check your system.log file. In my case error looks like this: Warning: Header…
Sometimes, after upgrade Magento, and introducing a new template, You may not see it. Why? Because each product can have a changed template to ‘default/default’.…
Edit app\design\frontend\theme\default\layout\customer.xml add action : 0 to wrapper block, like this: My Account Wrapper my-account 0
To resolve this problem, set up new system variable in windows: Variable name: JAVA_OPTS. Variable value -Xms256m -Xmx512m Or just edit file : PhpStorm_Install\bin\PhpStorm.exe.vmoptions by…
$attribute_code = ‘some_attribute_code’; $attribute = Mage::getModel(‘eav/config’)->getAttribute(‘customer_address’,$attribute_code); $options = $attribute->getSource()->getAllOptions(); foreach ($options as $option) { if ($option[‘label’] === ” && $option[‘value’]) { $newOptions[‘value’][$option[‘value’]][] = $option[‘label’]; $newOptions[‘delete’][$option[‘value’]]…
Create database mysql> CREATE DATABASE databasename; Query OK, 1 row affected (0,02 sec) Create user mysql> CREATE USER ‘abadowski’@’localhost’ IDENTIFIED BY ‘passwordname’; mysql> GRANT ALL…
Saving product with data like this: $ids = array(‘1′,’1′,’2’); $_product->setWebsiteIds($ids); makes error : “SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry …”. To avoid this error,…
protected function removeQsVar($url, $varName) { $parts = parse_url($url); $queryParams = array(); parse_str(html_entity_decode($parts[‘query’]), $queryParams); unset($queryParams[$varName]); $queryString = http_build_query($queryParams); if(strlen($queryString)>0){ $queryString = ‘?’ . $queryString; } $url…
$corehelper = Mage::helper(‘core’); $cheapestrate = 0; if($_product->isSaleable()) { $_product = Mage::getModel(‘catalog/product’)->load($_product->getId()); $quote = Mage::getModel(‘sales/quote’); $quote->getShippingAddress()->setCountryId(‘PL’); $addToCartInfo = (array) $_product->getAddToCartInfo(); $request = new Varien_Object($addToCartInfo); if ($_product->getStockItem())…