Totally Zenned
- Join Date:
- Sep 2007
- Location:
- Dublin, Ireland
- Posts:
- 1,281
- Plugin Contributions:
- 5
Display price with VAT/TAX and Ex VAT/TAX
Brent:
Hi Andrew (or any php boffins),
Firstly, many thanks for this mod (You should stick your PayPal address in the readme :smile:)
One question. I'm merging the changes in \includes\templates\uktemplate\sideboxes\tpl_shopping_cart.php but as I can't read code I wanted to check on the following in line 28 where yours has:
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
>
> and the stock version has:
>
> ```php
if (isset($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
Is the missing "isset" intentional? I've searched online and found what it does, "isset is a function that takes any variable you want to use and checks to see if it has been set" but I'm a bit out of my depth here :blush:
Regards
Brent
Brent- you are correct. Proper code should see if the variable is 'isset' before checking it. However the first form should still work as the $_SESSION should still return NULL.
Andrew
Andrew Moore
Omnicia Agile Development
www.omnicia.com