Top sellers

  • Delete Orders
    Delete Orders

    Enable the option to delete orders in admin page -> orders Also you...

  • CoolShare

    Add a social bookmarks with mouse over animation.

  • Categories image
    Categories image

    This module allows you to display the block in the category, but with...

  • Mass price update
    Mass price update

    This module allows you to update quantity or percentage, the prices of...


Recent orders (+)

Countdown Specials - Flash sales

Received: 11/19/2017 18:59:53
Customer: Reto
Send to: 4457 Diegten, Switzerland
Order value:$52.75
View all ->
PrestaShop Quick service failure solution - Nº of errors to fix : 1, Priority : Normal

Received: 10/28/2017 15:25:13
Customer: Veronique
Order value:$15.00
View all ->

Received: 10/21/2017 21:05:00
Customer: Peter
Send to: Kostelec, Czech Republic
Order value:$55.00
View all ->
Promotions Pack

Received: 10/21/2017 12:32:23
Customer: Robert
Send to: Warszawa, Poland
Order value:$80.00
View all ->

Received: 10/06/2017 09:56:03
Customer: Jamie
Send to: Salisbury, United Kingdom
Order value:$55.00
View all ->

In this little tutorial, we'll show you how to create a cart rule that only applies if cart products do NOT belong to a certain category. For example, we wish to have a discount of 10% for the entire catalog, but we do not want that discount applied if the products purchased belong to the category HOT SALE (ID 10).

First we create the discount rule as we normally do, and then modify the CartRule.php file.

The file that is responsible for validating the coupons is the classes / CartRule.php, inside it, there is a function called "checkValidity".

What we will do is add our code to the beginning of this function, but for this we can create a file called CartRule.php inside the folder overrides / classes / and create the override, or directly modify the original file in classes / CartRule.php ( If we update PrestaShop the change is lost and we must do it again). There are hundreds of tutorials to do overrides, so we will focus on the function itself.

The only thing we need to change is the category code that prevents the rule from being applied to apply the Voucher. In this case it is 10