Get Free Audit

Showing The “As Low As” Price On Prestashop

Jan 23, 2014

2014 Alex Simonchik

Showing The “As Low As” Price On Prestashop

Our team is constantly monitoring Prestashop forum and we always try to help other users. So, today we would like to solve another issue indicated in this thread: “How I could show the “As Low As” price?”

Hi,

I have 5 different prices depending of the quantity and I’m looking to show below the products thumbs, the “As Low As” price similar to:

http://www.trophydepot.com/

How I could get show the low price, since the prestashop work basis in a discount way? Example, I have:

1+= $9.37

10+= $ 8.77

75+= $8.17

150+= $7.42

300+= $6.42

I would like to show the $6.42 (low price) in the category page. Any idea?

See attachment.

Thanks!

Showing The “As Low As” Price On Prestashop

Prestаshоp allows setting scalable prices for different quantities of items and thereby stimulate customers to make purchases. You can set this option in the Prices tab under the Catalog > Products > Edit  section

Showing The “As Low As” Price On Prestashop

After that you will see a table with prices on the product page:

Showing The “As Low As” Price On Prestashop

There are several ways to access product price data:

  1. Use the hook “actionProductListOverride”;
  2. Override the function CategoryController::assignProductList();
  3. Override the function Category::getProducts($id_lang, $p, $n, $order_by = null, $order_way = null, $get_total = false, $active = true, $random = false, $random_number_products = 1, $check_access = true, Context $context = null);

The correct way would be use a hook, because this a “modular” approach, however in this example we will override the function CаtegоryCоntrоller: :аssignPrоduсtList( ). So, lets change the collection of products by adding the following code into the function  CategoryController::assignProductList():

Vlad Yunusov
Partner With Us Let's discuss how to grow your business. Get a Free Quote.
Talk to Vlad


So now our collection contains the necessary data which we can output by customizing the template product-list.tpl:


Let’s add some styles into the global.css:


Now the directory page looks like this:

Showing The “As Low As” Price On Prestashop

Vlad Yunusov
Partner With Us Looking for a partner that will help you to grow your business? We are the right company to develop your webstore. Feel free to get in touch with us. We will be happy to discuss your business opportunities and provide you with a Free Quote. Talk to Vlad

17 Comments

  1. Hi, how do I display this in the list configuration as well? It works fine when in grid configuration, but not in the list configuration.

  2. Hi,

    Tank you very much for this useful topic. It works fine but there is no price on homefeatured (popular products on homepage) when I use it. Do you have a solution?

    Bye

  3. Good evening, I’m a newbie prestashop, use version 1.6 where the first change should be applied not quite understand.
    It should be changed in the file override / controllers / front / categorycontroller.php right?
    and where it needs to be added to this code?
    thanks

  4. Hi!
    I have exactly the same need as described in the post.
    Thanks for sharing it
    I implemented the code on a Prestashop 1.6. Seems to “work” as I have data, but they are not really relevant.
    The different in my case is that I have prices depending on customer group.

    On BO for a product, prices are :
    https://docs.google.com/file/d/0B8Ovb3KCwQK4M0lPQ3ZsVktROUE/edit?usp=drivesdk
    124.92 € without tax (=149.90 with taxes)
    58,28 for a specific customer
    83.25 for B2B customer group (=”Revendeurs”) from 1 piece
    74.95 for B2B customer group (=”Revendeurs”) from 5 pieces
    -30% for GAT customer group

    In FO I have the following as low as price : 44.97 which seems to be the reduction price with taxes : 149.90 * 30% = 44.97

    But this price should be 149.90 – (149.90 * 30%) = 104.93
    and only displayed if I am logged as a customer from GAT group.

    So the price should be the folowing, depending of the customer :
    – 124.92 for unlogged customer or B2C customers
    – 58.28 for the specific customer
    – 74.95 for B2B customers (=”Revendeurs”)
    – 104.93 for GAT customers

    instead of 44.97 which is a reduction and not a product price and appears independently of the customer group.

    And it should be displayed with or without taxes depending on group configuration.

    How can we fix your code?
    Other notes:
    – How can we add this hack as an override instead of modifying a core php file?
    – In your code you write “as low as” not with best practices which is to use {l s=”as low as”}

    Thanks a lot for your answer

  5. Jota Dominguez,

    I have not checked this myself, but you may let us know. But in general, the main principle remains the same.

  6. Hi again, Jacek!

    all the below controllers should use the template product-list.tpl:

    search -> controllers/front/SearchController.php

    new products -> controllers/front/NewProductsController.php

    best sellers -> controllers/front/BestSalesController.php

    specials -> controllers/front/PricesDropController.php

    list of products by manufacturer -> controllers/front/ManufacturerController.php

    compare -> controllers/front/CompareController.php

  7. Alex,

    The solution that you show in this tutorial is definitely needed but it’s very incomplete. As a result you are able to show “As low as” prices on the product listing page but this is not the only place this would need to be presented. When browsing products via: Search, New products, Best sellers, Specials, List of products by manufacturer or even using the PrestaShop ‘Product compare’ feature the prices are shown without “As low as” values. I am looking for a way to display “As low as” prices in all above mentioned areas. Is there a method to achieve this or the relevant templates and controllers would need to be modified?

  8. Alexander,

    What I meant is that the function that is achieved via the steps described in this article should be already built into a modern e-commerce software, such as Prestashop 1.6. It’s a very useful function. Thanks for sharing your knowledge.

  9. Hello, I’m not very good at prestashop or customizations yet, and was wondering if this could work for what I am trying. I would like the display price to be the 10-25 price on trophies, instead of the highest price. Here is a page with one of my items on it
    What I would like to display is “Team Price” with the 10-25 quantity price listed. I have setup a 10+ custom price, but couldn’t make the above instructions work for me. Any help would be greatly appreciated.

  10. Jacek,

    Sorry, but I am not sure I understand your question. Each product can have a price which is displayed on the frontend – this is the default price.

  11. Very useful article. Thank you. I am surprised that the PrestaShop 1.6 doesn’t provide displaying prices in such a way as a standard or there are no modules that would do this.

  12. Thanks.
    Can you tell me how can i display this in case that a product has multiple price/combinations ?

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *