Search code examples
prestashopshopping-cartcartprestashop-1.6

How to display shopping cart total in Prestashop 1.6


could anyone help me how to modify some tpl files in Prestashop 1.6 to show not only the number of products in cart but also the order total like this (before having mouse over).

Cart: $1150 (3)

where:

$1150 - is the order total (3) - number of products in cart

Thanks a lot! Tereza


Solution

  • Actually, the total order price is already in the templates, but is hidden by CSS:

    blockcart.css#L53-L54

    Comment out this rule to see the total price in cart block summary. Notice that I linked the file in default theme, your theme may be different.

    To move the total price before the product count you'll have to edit the module template:

    blockcart.tpl#L35-L45

    Move the whole span element (note the content inside it and closing tag) to before line 32.

    And these are the constant that you can use to replace BOTH_WITHOUT_SHIPPING:

    Cart.php#L147-L154

    Please be aware that I linked files from 1.6.1.x branch, which corresponds to the latest version of 1.6.1: 1.6.1.4. You should check in you own shop files for these constants.

    I couldn't find any info for these constants, so you should probably try them out yourself. I'd begin with trying BOTH constant.

    Upload these modified files to FTP.