Saturday, April 30, 2011

PrestaShip Tips - PrestaShop 1.4 wrong price displaying issuse with imported products and fixes

If you use PrestaShop and use Import function to import catalog data(categories, products), you may face some issues. Those issue seems happens at

What is the problem
After upload products data from CSV file. You will find following potential issue.
1. Product price displayed at front office it not correct
2. Stock information at front office may incorrect. Product will show as out of stock even it is not.

The above issues only happens if your products do not have attributes or options.

The cause of problem
The upload program in PrestaShop 1.4.0/1.4.1 has a small bug. It does not set cache_default_attribute correctly.

How to fix
Run following two SQL statement at your PrestaShop database, it will fix above problem. You can use database admin tool such as PhpMyAdmin

1. Set cache_default_attribute field to 0 for all products
UPDATE `ps_product` SET `cache_default_attribute` = 0;

2. Reset the values
UPDATE `ps_product` AS p, `ps_product_attribute` AS pa SET p.`cache_default_attribute` = pa.`id_product_attribute`
WHERE p.`id_product` = pa.`id_product` AND pa.`default_on` = 1

Please replace "ps_" to the table prefix of your PrestaShop if it is different from default "ps_".

Looking for some modules to empower your prestaShop?
Please check following popular and wonderful modules.
Free PrestaShop addon and modules are also available at the same site.

Agile Paypal-PrestaShop Paypal Express checkout module,No SSL, No customer Registration, help reduce error and customer sropout rate.
Agile Membership- membership fee/expiration/discounts management
Agile Pickup center- shipping module for local pickup location management
Agile multiple seller - enable customer seller accounts to sell/manage products

Thursday, April 21, 2011

PrestaShop Tips - How to set and enable Paypal IPN - Instant Payment Notification

If you are using Paypal as payment method (not using API version) at PrestaShop, you will need to enable your IPN - Instant Payment Notification to get your order validated by PrestaShop.

There was a change about IPN on Paypal side at the end of last year. You must enable or set IPN to on so that Paypal will send IPN data, otherwise, it will not send IPN data even you pass IPN URL.

If you don't enable or set IPN on at your Paypal account, the order will not be generated at your PrestaShop. So you will not see the order show up in your order list. This causes a lot trouble at the moment Paypal changed the behavior.

Here is instruction on how to set you IPN at your Paypal account.

- Login to your Paypal account.
- Click Profile tab
- Click "Instant Payment Notification Preferences" on right column
- Enable IPN and the URL to your website home page.

Actually the URL is not important as long as you have it enabled. Because PrestaShop will pass by an URL to Paypal to overwrite the URL your set up here.

Here is the screen of the IPN setting

PrestaShop Tips - Fatal error at order validation after payment 1.4.0/1.4.1

The problem
If you have upgraded from 1.3x PrestaShop to PrestaShop 1.4, you customer may encounter a Fatal error when place an order. The order occurs at order validation stage after payment.

See here for more information on how Paypal and PrestaShop process your order

Customer may or may not see the "Fatal Error" screen, it depends on the payment method of customer selected. If the payment method is late/slow validation like Paypal, then customer is not able to see error. If customer select instant/fast validation like Pay by Cheque, Bank transfer, then customer will see the error.

But either, the the order will not show up at your PrestaShop back office because the order validation failed. Customer may also not able to received "Order confirmation" email.

Why would it happen?
1. In PrestaShop 1.4x, the method of ValidationOrder() in PaymentModule class has been modified to validate the secure key. The secure key is generated when customer is registered.

if ($secure_key !== false AND $secure_key != $cart->secure_key)

From above code, you can see that if secure key passed to this method does not match the one saved in cart,then the Fatal Error will occur.

2. During upgrade from 1.3x to 1.4x, it seems there is an issue that cause customer record secure key is not migrated successfully.

Solution/Walk around
1. The best solution is repair your customer data to get secure key from old (existing store) database if you have backup.

2. As a walk around, you can comment out the secure key validation line to avoid error. But I suggest use this only for temporary solution before you fix your customer data.

There are also some other causes of Fatal at order validation.
* During creating Order Status History, if passed in order status is incorrect, it will cause an fatal error.

* If you have a customized invoice, and some error happen when generated invoice.
For example, background image not found.

PrestaShip Info - Agile Multiple Seller/owner/vendor module 1.0 just release

About Agile Multiple Seller
Agile Multiple Seller is a PrestaShop module that enable multiple sellers, multiple owners or multiple vendors shares one PrestaShop store/shop.

One primary Seller who is owner of the PrestaShop store and control the access of the PrestaShop Store.
Secondary owners share the same store with limited access, they can list/sell/manage their products/orders

Admin Features
* Primary owner has full access to all the resources of the store(admin)
* Secondary owners share the store with limited access to stores.
* Secondary owners access permission is configurable by the primary administrator via Employee - Permissions tab
* Primary owners can register secondary owner
* Customer can also become a seller if they sign up for a seller account.
* It is configurable by primary seller to allow customer seller or not.
* It is configurable to create customer seller automatically at sign up or not.
* New order email notices are sent to secondary seller.

Access permissions

* Secondary owners can add/view/edit/delete of following data that created by themselves or belongs to them. Products Orders Customers Address

One order/address/customer may have multiple owners, all owners have share the same access

*By default, Secondary owners can view the following information Categories Manufacturers Suppliers Manufacturers Suppliers
Groups Merchandise Returns Customer Messages Statuses PDF

* If necessary, primary owner can set more access permissions based on their needs and situation.

Seller account
My seller summary page is added to show basic products/orders/sales information
A My seller account link is added to My Account page and My account block

More and more seller account stats information are coming up soon.

Where to buy
You can buy the module at

Other modules and free modules are available
Agile Paypal Express Checkout - No SSL, No customer registration, get payment done in just a few clicks
Agile Pickup center - Manage PrestaShop pickup location, delivery center, Google Map linked
Agile Membership - Manage membership expiration, membership fee, access control, member discount
Agle SEO tag clouds - SEO friendly URL enabled tag clouds module for PrestaShop

PrestaShop Tips - Fatal error (StockMvt -> id_stock_mvt_reason = -1) at product update or image upload

If you are using PrestaShop, the first official release of PrestaShop 1.4, You may encounter following Fatal error at uploading images for products at back office catalog.

The error details

Fatal error (StockMvt -> id_stock_mvt_reason = -1)

How does it happen?
There are multiple tabs of product information. Info tab include basic and core information of a product. Images tab manages product images.

The errors seems happens when your upload product image at catalog admin page.
When you upload new images, PrestaShop tries update the product database, one the the information is the product Stock movement. If you leave your Stock movement selection as "--", internal value = -1 at Info tab, then upload images at Images tab, this error will occurs

How to avoid the error
In order to avoid the Fatal Error, you need select a proper Stock Movement instead of "--" from drop down list, then go to image pages to upload your image.

You can choose any option like "Order", but leave the number to 0 for no changes.

Please note, the Fatal error will occur in any update of your products when you click "save" button if you leave Stock movement as "--".

I have no idea why there is such an option "--" at first place, if we already have option of "0" for no changes, we should not have this option.

Good news(update):
I heard that this issue has been fixed in 1.4.1, so it only happens on 1.4.0

Tuesday, April 19, 2011

PrestaShop Tips - Where to downlaod old versions of PrestaShop

Most developers or prewstaShop owners want to download an old version of PrestaShop for testing or some other reason, but they don't know where they can get it. I myself actually have to Google to find out every time.

For myself also for others reference, here is the link that you can find all old version of PrestaShop.

Friday, April 15, 2011

PrestaShop Tips - Ver 1.4 product referece number not show up in catalog mode

In PrestaShop 1.4, there is a very good new feature "Catalog Mode".

By using this feature you can use PrestaShop as catalog website that just introduce product information, no online shopping functionality. If you are looking for a catalog management website, it is also very good recommendation.

But there there is on small issue when you use "catalog mode", some time the small issue is very critical.

The problem:

The reference no of product will not show up if your product does not have a combination attributes.

Because reference no is only displayed in attribute combination box.
So if your product does not have attribute combination, the reference no will not show.

The solution is very easy.
What you have to do is move the reference no displaying line to the top on short description box.

After following lines

<div id="pb-left-column">
{if $product->description_short OR $packItems|@count > 0}
<div id="short_description_block">

Add following line

<p id="product_reference" if="" or="">reference}style="display: none;"{/if}><label for="product_reference">{l s='Reference :'} </label><span class="editable">{$product->reference|escape:'htmlall':'UTF-8'}</span></p>

How to set Catalog Mode
1. log in to back office
2. Click Preference tab
3. Click Products sub tab
4. Choose Yes to "Catalog Mode"
5. click Save

PrestaShop Tips - Web Serivce function in ver 1.4

If you are an owner of PrestaShop 1.4, you may or may not noticed that in this new version, it provider web service functionality. This is one of the new features PrestaShop 1.4

What is "Web Service" of PrestaShop?
PrestaShop's Webservice allow third-party applications to accessing resources of PrestaShop : orders, products, address,countries,customers, etc...

Like the front-office and the back-office, the Webservice is a way for managing data of your shop.

When do you need to use WebService
This tab must be used only in the case of using a third-party application (web or software) or by a developer.

For example, if you want manage your PrestaShop data from other website. Or you want to retrieve data from PrestaShop to use for other web site. You can use this web service feature.

How to configure?
At back office, Tools - Web service tab

Click a new to create a new web service.
1. Set or generate key
2. Set sttaus
3. Set description
4. Set data access permission of the web service

Click save

For more information, please visit

Wednesday, April 6, 2011

PrestaShop Tips - Paypal recurring payment and Agile Paypal

Paypal Recurring Payment
When you use PayPal Subscriptions and Recurring Payments, your customers can purchase automatically recurring subscriptions from your website.

Subscriptions and Recurring Payments is a low-cost way for you to accept credit card and bank account payments for content site subscriptions, newsletter fees, club dues, or recurring donations, and can be fully integrated with your website in a few easy steps. Subscriptions and Recurring Payments is only available for Business or Premier accounts.

Benefits of Recurring Payments
Save time and money with PayPal's hassle-free Subscriptions and Recurring Payments:

* Easy to implement - flexible and automatic billing frees you from sending invoices
* No up-front costs - you'll have the same low fee schedule used when you receive other PayPal payments
* Sell with ease - PayPal maintains detailed transaction records on our website
* Improve buyer experience - with customizable buttons and secure payments, happy customers become repeat customers

Agile Paypal and Recurring Payment

Agile Paypal is a PrestaShop Paypal Express Checkout module, the latest version Agile Paypal 1.2 added a new feature : Paypal Recurring Payment.

* Store owner is able t configure recurring cycle by choose daily/weekly/monthly/yearly or choose all of them.

* Customer is able to choose the number of cycles to subscribe. Or by default with limit of cycles until canceled by payer (customer) or recipient (store owner).

This module has many other features such as
* Pay major credit (Master, Visa, American Express) or event debit cards
* Does not require SSL (HTTPS)
* Does not requires user registration at PrestaShop store
* Easy to install and configure. You don’t have to change any file by default.
* Avoid address configuration errors because of no “state”.- And many more
* Many more

More Info
You can find more information and customer's reviews at following thread in PrestaShop forum.

You can buy this module at following location.

Saturday, April 2, 2011

Prestashop Tips - Domain name and hostname is saved in DB

Most PrestaShop owners or potential owners do not realize a small change in PrestaShop 1.4. The domain name or the hostnbame now is saved in database ps_configuration table.

So if you are going move you store domain, please be caution of this changes.
In following cases, you will need to manually change the data saved in ps_configuration table.

1. If you setup your store locally, then move to real hosting site by backup and restore method.
2. If you are going to move your store domain from one to another in the same hosting server, but keep the database not changed.
3. if you are going to move your store to complete different server or hosting companay.

If you do not change domain name, when you access your new domain of your website, it will always be redirect to old domain website.

Pleaase following this to change your domain name

1. Use database admin tool like PhpMyAdmin (from your site control panel)
2. Locate table ps_configuration
3. Look for records with following name (by default they ID is 155/156)


4. Change the domain name to your new domain.
Please note: domain means domain name only, should not include the path.
for example, if your store URL is, then only input ""

the subfolder should be defined in file /config/ of you store.