Prestashop

Prestashop: Manufacturer Page Slow

Posted on

-> Classes-> Manufacturer.php   /* $results = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(' SELECT p.`id_manufacturer`, COUNT(DISTINCT p.`id_product`) as nb_products FROM `'._DB_PREFIX_.'product` p USE INDEX (product_manufacturer) '.Shop::addSqlAssociation('product', 'p').' LEFT JOIN `'._DB_PREFIX_.'manufacturer` as m ON (m.`id_manufacturer`= p.`id_manufacturer`) WHERE p.`id_manufacturer` != 0 AND product_shop.`visibility` NOT IN ("none") '.($active ? ' AND product_shop.`active` = 1 ' : '').' '.(Group::isFeatureActive() && $all_group ? '' : […]

Prestashop

Prestashop: Remove undefined from Product List

Posted on

When you switch the view from Manufacturer's Product List you get an undefined Character.  To remove this go to  /var/www/html/XXXXXXX/themes/default-bootstrap/js/global.js: Comment the following lines: Line 284: html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';   Line 324: html += '<h5 itemprop="name">'+ $(element).find('h5').html() + '</h5>';

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 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: 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/