Hi David,
Just wanted to catch up following node/6723 on the Remove All from the shopping list.
The link is actually broken from new instalations of pricetapestry.
The fix on node/6723 works fine so the function can still be used but is it a permanent solution?
Best,
Antony
Hi David,
thanks for you're response. I actualy have the following from line 537, tried to implement the above in various ways but then the link breaks.
Thanks
{code saved}
Hi Antony,
It looks like you have other changes in includes/tapestry.php so rather than line specific within the tapestry_shoppingListRemove() function look for the remove @ALL section as follows (based on the previous fix)...
if ($_GET["remove"]=="@ALL")
{
$shoppinglist = array();
setcookie(tapestry_shoppingListCookieName(),serialize($shoppingList),strtotime("+90 days"),"/");
}
...and REPLACE with:
if ($_GET["remove"]=="@ALL")
{
setcookie(tapestry_shoppingListCookieName(),"",strtotime("-1 day"),"/");
}
(immediately following is the "else" statement leading to the individual product removal code...)
Cheers,
David.
--
PriceTapestry.com
Hi Antony,
It's best to set an expiry date in the past to actually clear the cookie rather than set an empty value - to fix, edit includes/tapestry.php and look for the following code at line 537:
setcookie(tapestry_shoppingListCookieName(),"");
...and REPLACE with:
setcookie(tapestry_shoppingListCookieName(),"",strtotime("-1 day"),"/");
(updated in distribution 18/06A)
Cheers,
David.
--
PriceTapestry.com