Stable release
1.4.7.3 / April 5, 2012
Preview release
1.5.0.9 (Beta 4) / March 26, 2012
Written in PHP
Operating system Cross-platform
Type Webshop
License OSL Ver. 3
Website www.prestashop.com
PrestaShop is an e-commerce solution which is free and open source. It supports payment gateways such as Google Checkout, Authorize.net, Skrill, PayPal and Payments Pro via API. Further payment modules are offered commercially.
PrestaShop is available under the Open Software License and officially launched in August 2007 for small to medium-sized businesses. The software, which is based on the Smarty template engine, is currently used by 100,000 shops worldwide.[1] PrestaShop was named the Best Open Source E-Commerce Application in the Packt 2010 Open Source Awards[2] and the Best Open Source Business Application in the 2011 Open Source Awards.
The PrestaShop group was founded in Paris, with a second office recently opened in Miami. Over 40 languages are available to varying degrees, with only English and French having full support in all release versions. Technical support is provided on the official forum.[3]
The software makes extensive use of AJAX in the admin panel, while module blocks can be easily added to the store to provide extra functionality; these are normally provided free of charge by independent developers. The makers of PrestaShop have an official marketplace for priced modules and themes entitled PrestaShop Addons.[4]
Since PrestaShop is widely accepted Shopping cart software there are number of volunteers who supports and contributes Addons. Contributors often program additional features for the software, even it is loaded with 275 features already. Recently Mob eCommerce has released Mobile app for Prestashop. Now PrestaShop users can give mobile app for their customers which will increase the sales. [5]
Continue reading “PrestaShop” »
Zencart adds write a review button to the product info page so that the customers can review the item.
This article explains how to remove it from the zencart product info page from the admin panel
settings.
To remove the link to add review about the product on the product info page in zencart follow this
tutorial:
Goto zencart admin panel
navigate to: admin > catalog > product type
Select your product type (usually Product-General is used)
Click edit layout in the right side
Select Show Product Review Button = False
This will remove the add a review link on the product info page of your zencart shop.
Zencart’s inventory management is bulky and can sometimes take way too long to do really simple things – like changing the stock of many items at once.
To fix this, we’ve made an admin page calles easy_update.php that can do lots of stock changes at once, as well as organize products by stock, ordered but not shipped, and # of people subscribed. This is our daily go-to for the store inventory ‘health’ – letting us know whats the most important thing to get back into stock at a glance
(recall that we keep 3 pieces of each item on hand for emergencies such as replacements or lost shipments, etc. which is why at qty 3 its considered out of stock)
Here’s the file we use:
ez_update.php.zip
Download this file and follow the instructions here to place it in the admin menu.
Javascript
You’ll need to replace YOUR_API_KEY with you own google CDN key, or a path to your own jquery files. More info here…
The html table on this page is also sorted with the tablesorter plugin. Download the newest version of jquery.tablesorter.min.js and save it in your admin/includes/javascript directory.
The tablesorter plugin is pretty great – it will automatically choose whether to sort numerically or alphabetically, and you can hold down the shift key to sort by multiple columns at once.
CSS
There’s a lot of info on this page and it can get confusing to look at without some nice CSS to go with it. Here’s our CSS that’ll alternate colors every other row, and make any items that are out of stock red.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
table.tablesorter {
font-family:arial;
margin:10px 0pt 15px;
font-size: 8pt;
width: 100%;
text-align: left;
}
table.tablesorter thead tr th, table.tablesorter tfoot tr th {
background-color: #e6EEEE;
border: 1px solid #FFF;
font-size: 8pt;
padding: 4px;
}
table.tablesorter thead tr .header {
background-image: url(js_img/bg.gif);
background-repeat: no-repeat;
background-position: center right;
cursor: pointer;
}
table.tablesorter tbody td {
padding: 4px;
vertical-align: middle;
}
table.tablesorter thead tr .headerSortUp {
background-image: url(js_img/asc.gif);
}
table.tablesorter thead tr .headerSortDown {
background-image: url(js_img/desc.gif);
}
table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp {
background-color: #8dbdd8;
}
table.tablesorter tbody tr.odd td {
background-color:#e4faed;
}
table.tablesorter tbody tr.even td {
background-color:#c3fad9;
}
table.tablesorter tbody tr.red td{
background-color:#ffDDDD; |
Save this CSS as admin/includes/javascript/table_style.css.
Notes
NOTE: This file uses the back in stock notification mod. If you haven’t added this mod on your site then you’ll need to remove these code blocks from this file:
Line 18
|
1 |
require('includes/languages/english/back_in_stock_notifications.php'); |
|
1 2 3 4 5 6 7 8 9 |
// Remove this section if you are not using the back_in_stock_notification_manager plugin
$selectql = $db->Execute("SELECT product_id, COUNT(product_id) bisns FROM back_in_stock_notification_subscriptions GROUP BY product_id");
while(!$selectql->EOF){
if($selectql->fields['bisns'] > 0 && is_array($all_products[$selectql->fields['product_id']])){
$all_products[$selectql->fields['product_id']]['notification_subscribed'] = $selectql->fields['bisns'];
}
$selectql->MoveNext();
}
// remove up to here for back_in_stock_notification mod |
Line 231
|
1 |
<th>notification subscribed</th> |
Line 253:
|
1 |
<td><?php echo $info['notification_subscribed']; ?></td> |
Shorten & Prettify URLs
This mod will re-write your urls to look nice and pretty! There’s several plugins that SEO your urls for you like this one but they all seemed pretty complicated so we wrote our own.
This mod will change some core code and can potentially break a lot of things. Do not use this mod if:
you are already using an SEO mod
you cannot or are uncomfortable editing your .htaccess setup
you are not forcing cookies (if “Force Cookies” is turned off, zencart will put the session id as a GET variable in the url – shortening this is not advised)
includes/functions/html_output.php
Find line 16:
|
1 |
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) { |
and replace with
|
1 |
function zen_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true, $try_short_urls = true) { |
Tehn replace this code block (ln 43):
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
if (!$static) {
if (zen_not_null($parameters)) {
$link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
} else {
$link .= 'index.php?main_page=' . $page;
}
} else {
if (zen_not_null($parameters)) {
$link .= $page . "?" . zen_output_string($parameters);
} else {
$link .= $page;
}
} |
with
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
$short_url_failed = true;
if($try_short_urls == true && $page == 'product_info')
{
$sparam = explode('&', $parameters);
$products_id_string = '';
foreach($sparam as $full_parameter)
{
if( strstr($full_parameter, 'products_id=') !== FALSE)
$products_id_string = str_replace('products_id=', '', $full_parameter);
}
if( $products_id_string != '')
{
$link = 'products/' . $products_id_string;
$short_url_failed = false;
}
}
elseif($try_short_urls == true && $page == 'index')
{
$sparam = explode('&', $parameters);
$cat_id_string = '';
foreach($sparam as $full_parameter)
{
if( strstr($full_parameter, 'cPath') !== FALSE)
$cat_id_string = str_replace('cPath=', '', $full_parameter);
}
if($cat_id_string != '')
{
$link = 'category/' . $cat_id_string;
$short_url_failed = false;
}
}
elseif($try_short_urls == true && $page != '' && ($parameters == ''))
{
$page = str_replace('index.php?main_page=', '' , $page);
$link = str_replace('products_', '', $page) . '/';
$short_url_failed = false;
}
if($short_url_failed){
if (!$static) {
if (zen_not_null($parameters)) {
$link .= 'index.php?main_page='. $page . "&" . zen_output_string($parameters);
} else {
$link .= 'index.php?main_page=' . $page;
}
} else {
if (zen_not_null($parameters)) {
$link .= $page . "?" . zen_output_string($parameters);
} else {
$link .= $page;
}
}
} |
This will make the ubiquitous zen_href_link() function try to generate a good-looking url. If it fails, it will fall back on the old type.
This will change any links that are generated by this function, but you should go through your template files and make sure that there aren’t hard-coded links to the old type of address also.
.htaccess
Before you begin, always make a backup of your .htaccess file (we’re going to be editing the one i your root html directory).
#redirect old product urls
|
1 2 |
RewriteCond %{QUERY_STRING} ^main_page=product_info&(cPath=[0-9]+(_[0-9]+)?&)?products_id=([0-9]+)$
RewriteRule ^index.php$ /products/%3? [R=301] |
#redirect old category urls
|
1 2 |
RewriteCond %{QUERY_STRING} ^main_page=index&cPath=([0-9]+)$
RewriteRule ^index.php$ /category/%1? [R=301] |
#rewrite back to the old page
|
1 2 |
RewriteRule ^product[s]?/([0-9]+) index.php?hidden=yes&main_page=product_info&products_id=$1 [QSA,L]
RewriteRule ^(category|categories)/([0-9_]+) index.php?hidden=yes&main_page=index&cPath=$2 [QSA,L] |
The first two blocks of this code redirects from the old, ugly type to the new, short type. The [R=301] flag will redirect the client browser, so the url will look nice in their address bar even if they somehow click on an ugly url.
The last two lines redirect BACK from the nice-looking url to the ugly one, so that zencart will parse it correctly and output the correct page. As you could probably tell, this is very fragile and should cause an infinite loop of redirecting – make sure not to forget the [L] flag on the last two lines, it will make sure that it’s the last command that is processed.
If you’d like to change your define pages to have nice urls as well, you can add
|
1 |
RewriteRule ^MY_DEFINE_PAGE[/]?$ \?main_page=MY_DEFINE_PAGE |
for each one, replacing MY_DEFINE_PAGE with the name of your define page.
We use the Back in stock notifications plugin for zencart.
The plugin itself works out of the box, and the installation instructions are easy enough to follow, but there are a few modifications to be made that we think makes it better.
Simple Captcha
We used Securimage, which also works quite well as advertised.
Install Securimage somewhere on your webserver, and make these modifications to the Back in stock notifications plugin.
In includes/modules/pages/back_in_stock_notification_subscribe/header.php Line 56 Add
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
include("PATH_TO_YOUR_SECURIMAGE_PHP");
$securimg = new Securimage();
$valid = $securimg->check($_POST['captcha_text']);
(Obviously, you ned to replace PATH_TO_YOUR_SECURIMAGE_PHP with your own path)
Then find Line 74
else if (strtolower($_POST['email']) != strtolower($_POST['cofnospam'])) {
$form_errors['cofnospam'] =
BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_EMAIL_CONFIRMATION_DOESNT_MATCH;
}
and replace with
else if (strtolower($_POST['email']) != strtolower($_POST['cofnospam'])) {
$form_errors['cofnospam'] =
BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_EMAIL_CONFIRMATION_DOESNT_MATCH;
}
else if (!isset($_POST['captcha_text']) || $valid == false)
{
$form_errors['captcha'] = BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_CAPTCHA;
} |
in includes/languages/english/backin_stock_notification_subscribe.php add
|
1 2 3 4 5 6 7 |
define('BACK_IN_STOCK_NOTIFICATION_FORM_ERROR_CAPTCHA', 'Please verify the text on the right!');
in includes/templates/YOUR_TEMPLATE/templates/inc.html.back_in_stock_notifications.html Add wherever you want the captcha to show up (we choose L36&L113 right afer the submit button)
<img style="float: right;" src="securimage_show.php" />
<ceon:if isset="captcha_error"><p class="alert"><ceon:variable name="captcha_error">Please verify the text on the right!</ceon:variable></p></ceon:if>
<label class="inputLabel" for="captcha_label"><ceon:variable name="captcha_label">Verify text</ceon:variable>:</label>
<input type="text" size="35" maxlength="96" name="captcha_text" /> |
Individual produts
By default, the sendBackInStockNotifications() functions sends notifications to everyone who has subscribed to any item that is back in stock. Continue reading “Back in stock notifications” »
An easy feature to miss in the zen cart code is the ability to customize your meta tags for individual pages.
For categories and products, the meta tag editors are nice and can be accessed by clicking button at the far right of the categories/products section.
For define pages (the static pages that aren’t products – like “contact us”), it gets a little trickier.
In the /includes/modules/meta_tags.php file, you’ll find code that looks like this
|
1 2 3 4 5 6 |
// if per-page metatags overrides have been defined, use those, otherwise use usual defaults:
if ($current_page_base != 'index') {
if (defined('META_TAG_TITLE_' . strtoupper($current_page_base))) define('META_TAG_TITLE', constant('META_TAG_TITLE_' . strtoupper($current_page_base)));
if (defined('META_TAG_DESCRIPTION_' . strtoupper($current_page_base))) define('META_TAG_DESCRIPTION', constant('META_TAG_DESCRIPTION_' . strtoupper($current_page_base)));
if (defined('META_TAG_KEYWORDS_' . strtoupper($current_page_base))) define('META_TAG_KEYWORDS', constant('META_TAG_KEYWORDS_' . strtoupper($current_page_base)));
} |
So these 3 meta tag fields can be customized, just not through the Admin.
So to create a custom title, description, and keywords for a page like “Contact us”,
Add these lines into /includes/languages/english/contact_us.php
|
1 2 3 |
define('META_TAG_TITLE_CONTACT_US', 'This is the new custom title for the contact us page.');
define('META_TAG_DESCRIPTION_CONTACT_US', 'This is the new custom description for the contact us page.');
define('META_TAG_KEYWORDS_CONTACT_US', 'Contact, Us'); |
As always when dealing with meta tags, remember not to go overboard with them! Google won’t even look at your keywords, and descriptions are only used to generate the blurb that is given to a user – it will never affect your page ranking. Simple and human-readable is always the best.
What you should know about the functions of open source software
The practice of providing the source code of a particular software through free public circulation offers developers and producers a practical way of adding new dimension to their design, development and distribution activities.
Today interactive communities and communication paths are the norm in this field as the internet enhances these elements in myriad ways. The open source model creates new avenues which enable input of different agendas, approaches and priorities. And through public collaboration often comes open source software releases.
Other applications of the open standards have been utilized by the Advanced Research Projects Agency Network (ARPANET) to develop telecommunication network protocols, while IBM’s once released its operating system among others in the 1950′s.
Netscape has been on the same route with the licensing and release of its code under the Netscape Public License and eventually under the Mozilla Public License. Wikipedia has often been cited as a good example of the foregoing open source principles, even though there are standing restrictions over certain uses or users.
Enterprises encounter hurdles in their quest to embrace and use open source software, such as the viral perceptions around open source licenses and also the lack of formal support, training and the absence of a strategic long term view flames risk issues around the open initiative.
Future plans are often concealed by various proprietary projects and some open source licenses are not viral, and revenues are actually accrued by many OSS projects through financed support documentation.
The dual license strategy is implemented as part of the business strategy of commercial open source software enterprises as in the case of MySQL and others. Continue reading “Guide to Open Source Software” »
If you plan to ship items abroad, the package will end up having to pass through the recipient’s customs office. These offices basically look at whats in the package and send a tax bill for any import tariffs or VAT. To speed up shipping (especially with a automated shipping system) its handy to have each items tariff information attached to the product. This tutorial will show how we do this by creating three new product attributes that are stored in the database: Tariff Number, Country of Origin and brief description.

This is also a general purpose tutorial for
adding a new field to each product which is editable from the admin product page.
DB Mods
As always, ALWAYS BACK UP YOUR DATABASE BEFORE APPLYING DB MODS.
|
1 2 3 |
ALTER TABLE `products` ADD `products_customs` TEXT NOT NULL;
ALTER TABLE `products` ADD `products_tariff_country` INT NOT NULL;
ALTER TABLE `products` ADD `products_tariff` VARCHAR( 255 ) NOT NULL; |
Adding a field to products
We’ll be adding three fields (products_customs, products_tariff_country, products_tariff). This method will work in general for any field that you would add to the table ‘products’.
Modified files:
admin/includes/modules/product/collect_info.php
admin/includes/modules/update_product.php Continue reading “Tariff information for each product” »
PrestaShop had been working fine until one night when I was on the Preferences page, I got automatically logged out after saving it. I thought it was normal but the auto-logout was persistent.
Everytime I re-logged in and clicked somewhere, I got automatically logged out and redirected to the login page. Browsing through the forums didn’t help – All the solutions didn’t work. And then I remembered a similar problem I had with Joomla and that my hosting provider solved it for me.
And sure enough, I found the working solution from a hosting provider.
Edit the Cookie.php File
So here’s what you should do. Download the cookie.php file using your FTP software. The file is inside the /classes folder.
For PrestaShop Version 1.3.x.x Continue reading “How to Solve PrestaShop Back Office Log Out Issue” »
ThickBox is a webpage UI dialog widget coded using the jQuery library. Its function is to show a single image, multiple images, inline content, iframed content, or content via AJAX in a hybrid modal window.
Unfortunately, ThickBox is no longer maintained by its developers so it is not recommended that you implement ThickBox on your website.
I wonder why the PrestaShop developers decided on ThickBox. Only when I started using PrestaShop, then I knew about ThickBox. Most of us were using the popular ones like Lightbox or Highslide right? Strangely, version 1.4 that just rolled out about a month ago is still using ThickBox…
Anyway, I’ll just share a bit on how to customize ThickBox – Increasing the size of the image, and positioning the ‘Close’ button to the top right. I’m running PrestaShop version 1.3.7.0.
Files to be Edited Continue reading “Customizing ThickBox in PrestaShop” »