Prestashop

Prestashop: Remove Rendering Blocking CSS

Posted on

If you do a Page Speed test on Google, to make sure your site is loading fast enough and a slow load time is not penalizing your SEO, you can do this hetre: https://developers.google.com/speed/pagespeed/insights/ One tipical error you’ll get is  Eliminate render-blocking JavaScript and CSS in above-the-fold content The solution I got was to remove […]

Prestashop

Prestashop:Product Custom Field on Product-List.tpl

Posted on

This was kind of a tricky one, I created a custom field on the database (explained on another post) and was able to add it to the product.tpl by adding just {$imagurl}. This variable did not work on product-list.tpl, upon some research the correct way to add this is by adding:   $product.em_mg_imageurl

Prestashop

Prestashop Shortlinks

Posted on

Manufacturer Link on Product Page <a href=”manufacturers-{$product->manufacturer_name|replace:’&’:”|replace:’ ‘:’-‘|lower}-{$product->id_manufacturer}” style=”color:blue; text-decoration:underline” ></a>     Manufacturer Link on Manufacturer List href=”{$link->getmanufacturerLink($manufacturer.id_manufacturer, $manufacturer.link_rewrite)|escape:’html’:’UTF-8′}”

Prestashop

Prestashop: Add custom column on Product Page and Display it on product.tpl

Posted on

Steps: Create the table manually on the database. Declare the variable on /classes/product.php add the variable on /controllers/front/ProductController.php in the following matter. $product_tariff = $this->product->em_mg_tariff_code; $this->context->smarty->assign(‘tariff_code’, $product_tariff); 4. Add the field on your tpl on the following matter. {$tariff_code}    

Prestashop

Prestashop: No follow causing W3 non-compliance

Posted on

The problem I believe has to do with changes on standards. The w3 validator shoes as an error to have multiple rel=”example” tags inside an argument. So when it added its no follow arguments did the following things. Incorrect <a rel=”nofollow” href=”http://www.malla-supply.com/manufacturers-abb-96?p=2” rel=”next“>   Correct <a href=”http://www.malla-supply.com/manufacturers-abb-96?p=2” rel=”next nofollow“>   To solve this I removed the […]

Prestashop

Prestsahop: Edit Variables

Posted on

I wanted to change the Manufacturer Name variable, to eliminate the spaces and replace it with a dash. I tried doing this with PHP, but it was terrible to do it, as there were multiple places to change it, and it some places impossible. To do it via PHP Variable I had to change it […]

Prestashop

Prestashop: Optimizing Store for SEO

Posted on

CSS Optimization: Every time you load a page it has to load the Global.css file which is big, and all the info there is not specific for that page. So configuration so that only the required parts of the CSS are loaded for that particular page. To accomplish this, there are two particular very important […]

PHP

Prestashop: Debug Mode and Memory Upgrade

Posted on

To turn on debug mode go to: config/defines.inc.php Set define(‘_PS_MODE_DEV_’, false); –> define(‘_PS_MODE_DEV_’, true);   To upgrade PHP Memory Limit vim /etc/php5/apache2/php.ini — Go to Memory Limit.   To check PHP Config create a file with the following code. <?php phpinfo(); ?>   Another way to raise you your servers performance is to create a SWAP file, […]

iDempiere

ERP to Webstore Integration

Posted on

Inventory is on iDempiere Script to get inventory on CSV File Script to upload CSV File from iDempiere’s server to webstore SSH to Remote Webstore to execute update Script Current Problems… Script to Export puts ” ” on the String.   Products are being doubled because comparison does not work. productImport.php —> when comparing the […]

Prestashop

Pretashop: Add and Update products Programmatically

Posted on

I’m working on a project where I need to add products from our ERP System to a Prestashop Catalog, and need to regularly mass update (10,000 products) some information on specific product (Pricing, Stock Information etc…) Current Situation: I’ve managed to create script to import from a CSV and add the files to the DB using […]

Prestashop

Prestashop: Edit Meta Title Info

Posted on

My Goal: I want the Title of the page to show,  Manufacturer Name – Part Number   Steps: Go to Meta.php Go to the Section getProductMetas   public static function getProductMetas($id_product, $id_lang, $page_name) { $sql = ‘SELECT `name`, `meta_title`, `meta_description`, `meta_keywords`, `description_short`, `reference` FROM `’._DB_PREFIX_.’product` p LEFT JOIN `’._DB_PREFIX_.’product_lang` pl ON (pl.`id_product` = p.`id_product`’.Shop::addSqlRestrictionOnLang(‘pl’).’) ‘.Shop::addSqlAssociation(‘product’, […]

Prestashop

Prestashop: Add Manufacturer Description to Product Page

Posted on

Add the following code to ProductController.php @ /controllers/front/ProductController.php $id_lang = $this->context->language->id; $manufacturer = new Manufacturer($this->product->id_manufacturer, $id_lang); $manuf_description = $manufacturer->description; $this->context->smarty->assign(‘manufact_desc’, $manuf_description);     Then Add the variable $manufact_desc to the product.tpl template. Watch out with the quotation formal.   http://www.prestashop.com/forums/topic/305984-add-manufacturer-description-into-product-page/