Cleaning Up Prestashop 1.6

So you want to clone a shop you previously done and now here is what to clean up from a prestashop installation if your looking to clone it for another shop.

A few things to think about when cleaning up:

  • database
  • configs
  • caching
  • existing categories
  • existing products
  • existing orders
  • existing customers
  • existing messages
  • theme name
  • others see below

DATABASE

db table ps_configuration
– do a search for %sitename%

db table

db table ps_shop_url
– update shop url

db table shop url


PS CONFIG

/site/config/defines.inc.php
– change dev mode to true

/site/config/settings.inc.php
– change db settings


TURN OFF CACHING

admin > advanced parameters > performance

ccc


CATEGORIES

– remove existing
– add placeholder images
– upload test categories

placeholder images

test categories

shop


PRODUCTS

– remove existing
– upload test products

test products

Run this SQL to fix product import error.

– make sure products dont have the same reference
– import does not ignore first line for product import

category


ORDERS

“prestashop 1.6.0 delete all existing orders”
– remove existing

delete from ps_orders;
delete from ps_order_carrier;
delete from ps_order_detail;
delete from ps_order_detail_tax;
delete from ps_order_cart_rule;
delete from ps_order_history;
delete from ps_order_state;
delete from ps_order_payment;
delete from ps_order_message;
delete from ps_order_invoice;
delete from ps_order_invoice_tax;
delete from ps_order_invoice_payment;

delete from ps_cart;
delete from ps_cart_rule;
delete from ps_cart_cart_rule;
delete from ps_cart_product;
delete from ps_cart_rule_combination;
delete from ps_cart_rule_lang;
delete from ps_cart_rule_product_rule;
delete from ps_cart_rule_product_rule_group;
delete from ps_cart_rule_product_rule_value;


CUSTOMERS

delete from ps_address;
delete from ps_advice;
delete from ps_advice_lang;
delete from ps_customer;
delete from ps_customer_message;
delete from ps_customer_group;
delete from ps_customer_thread;
delete from ps_delivery;
delete from ps_ganalytics;
delete from ps_guest;
delete from ps_newsletter;
delete from ps_mail;
delete from ps_paypal_customer;
delete from ps_paypal_order;


EMAILS/MESSAGES STORED

– remove existing
– update back-end contact emails

delete from ps_message;

admin > administration > employees

employees


STATS

“prestashop 1.6 delete all existing stats”
– remove existing
admin > stats

delete from ps_log;


OTHER DATA TO DELETE

delete from ps_specific_price;
delete from ps_specific_price_rule;
delete from ps_specific_price_rule_condition;
delete from ps_specific_price_rule_condition_group;


CMS PAGES

– empty content & add dummy content
– delete draft/hidden pages


ADMIN

– delete any users not required
– clean up shipping options


IMAGES

– delete category images
– delete CMS images
– replace logos
– delete product images
– update favicon


MODULES

– remove homepage sliders
admin > modules > image slider for homepage

modules

– 3 boxes on the homepage
admin > modules > theme > config

theme configurator

– footer copyright
\themes\default-bootstrap\modules\blockcms\blockcms.tpl

– header phone number
\themes\default-bootstrap\modules\blockuserinfo\nav.tpl

– remove lock-down for specific countries and currencies
admin > localization > currency
https://developer.ebay.com/Devzone/business-policies/CallRef/types/IsoCurrencyCode.html
admin > localization > *
admin > modules > location and currency detection > disable.

– update main menu
admin > modules > horizontal topbar

horizontal top bar


MISC

– turn off smarty cache when developing

in db > ps_configuration
search %smarty%

ps configuration

define(‘_PS_SMARTY_NO_COMPILE_’, 1); //0
define(‘_PS_SMARTY_CHECK_COMPILE_’, 0); //1
define(‘_PS_SMARTY_FORCE_COMPILE_’, 0); //2

ps config

Newsletter
\themes\default-bootstrap\modules\blocknewsletter\blocknewsletter.tpl

rename theme from ‘default-bootstrap’ to inception
admin > preferences > themes

theme form

default bootsrap

rename shop from presta2 to inception
??? can’t find the demo….

change admin back-end logo
admin123/img/prestashop-avatar…

inception web

upgrade some modules (admin > modules)
– google analaytics
– fc share button
– categoeries block

– newsletter block errored.

fatal error

currency won’t change? from EUR to DOLLAR?
– disable the currency, refresh page then re-enable

disable quick product view
admin > modules > theme > …

disable quick product view

limit the number of thumbnails created on product import – in this table? ps_image_type (or have a thumbnail regen button)
– does it really need all these thumbs…

thumbnails created on product import

admin > prefs > images
https://doc.prestashop.com/display/PS16/Images+Preferences

regenerate image thumbs
admin > prefs > images > …

regenerate image thumbs

add payment logos
admin > modules > theme > …

payment logo

add a heading

when you login to shop it actually goes to shop and not my account
unable to solve.

disable wishlist feature
solved in another blog post.

change default missing product image

change default missing product image

References:

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

One thought on “Cleaning Up Prestashop 1.6

Leave a Reply

Your email address will not be published. Required fields are marked *