wantsomegetsome Posted April 18, 2009 Share Posted April 18, 2009 How do you set this to have it where individual items can be removed from a shopping cart? I did a search and the 1 result didn't do it for me. It would be nice if this could be turned on/off from the admin area. I'm was thinking: nano templates/orderforms/cart/viewcart.tpl Find ??? After it add ??? If that is even half way right, I need help with the ???'s. 0 Quote Link to comment Share on other sites More sharing options...
wantsomegetsome Posted April 18, 2009 Author Share Posted April 18, 2009 I was using the boxes template. The cart template shows the Remove Item link. I used what was in the cart template and added it to the boxes template. For anyone else that finds this through a search, here is how to get a Remove Item link when using the boxes template. 1. Backup clients/templates/orderforms/boxes/viewcart.tpl 2. Edit clients/templates/orderforms/boxes/viewcart.tpl 3. At the very top add... {literal}<script language="javascript"> function removeItem(type,num) { var response = confirm("{/literal}{$LANG.cartremoveitemconfirm}{literal}"); if (response) { window.location = 'cart.php?a=remove&r='+type+'&i='+num; } } function emptyCart(type,num) { var response = confirm("{/literal}{$LANG.cartemptyconfirm}{literal}"); if (response) { window.location = 'cart.php?a=empty'; } } </script>{/literal} 4. Find... <a href="{$smarty.server.PHP_SELF}?a=confproduct&i={$num}" style="color:#009900;">[{$LANG.carteditproductconfig}]</a> 5. Right before it add... <a href="#" onclick="removeItem('p','{$num}');return false" style="color:#cc0000;">[{$LANG.cartremove}]</a> 0 Quote Link to comment Share on other sites More sharing options...
webrhyno Posted May 12, 2009 Share Posted May 12, 2009 I added this code to the default order template. Works perfect. thanks. 0 Quote Link to comment Share on other sites More sharing options...
ChrisGooding Posted May 13, 2009 Share Posted May 13, 2009 Hi, I will point out that it can be added to the default template too, but the line to add it before does differ slightly from the one indicated above, it is actually - <a href="{$smarty.server.PHP_SELF}?a=confproduct&i={$num}" style="color:#009900;">[{$LANG.carteditproductconfig}]</a><br /> I have added this to the default template, and although it works for products, it doesn't for domains. I have tried adding it to the start of the line below, but without success. <a href="{$smarty.server.PHP_SELF}?a=confdomains" style="color:#009900;">[{$LANG.cartconfigdomainextras}]</a><br /> Does anyone know how to allow the option of removing domains? 0 Quote Link to comment Share on other sites More sharing options...
Ked Posted May 17, 2009 Share Posted May 17, 2009 I've just come across this issue too. One of my customers accidentally selected a .com instead of a .co.uk and now they can't proceed with their transaction. Is there anywau to allow the removal of domains from the cart without hacking PHP? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted May 17, 2009 Share Posted May 17, 2009 They can empty the cart! 0 Quote Link to comment Share on other sites More sharing options...
Ked Posted May 17, 2009 Share Posted May 17, 2009 This is possibly a dumb question, but how? if I log in as a client, the only way I can get near the cart is by clicking on "Order". If I click the "Shopping cart" link then it just takes me back to the order page. I can't actually see my cart contents unless I select another product and progress through until the 5th step (confirm morder). At which point I can see previous product selections but there's no option for me to remove / empty the cart of products I no longer require. Surely I should be able to edit my product selections without having too go through torder process again?? BTW, I'm using V4 but I dont think the core cart functionality has changed that significantly from V3 0 Quote Link to comment Share on other sites More sharing options...
GCM Posted May 17, 2009 Share Posted May 17, 2009 This is possibly a dumb question, but how? if I log in as a client, the only way I can get near the cart is by clicking on "Order". If I click the "Shopping cart" link then it just takes me back to the order page. I can't actually see my cart contents unless I select another product and progress through until the 5th step (confirm morder). At which point I can see previous product selections but there's no option for me to remove / empty the cart of products I no longer require. Surely I should be able to edit my product selections without having too go through torder process again?? BTW, I'm using V4 but I dont think the core cart functionality has changed that significantly from V3 You can use http://www.(yourdomain).(TLD)/whmcs/cart.php?a=view to view what is currently in your cart. 0 Quote Link to comment Share on other sites More sharing options...
Ked Posted May 18, 2009 Share Posted May 18, 2009 You can use http://www.(yourdomain).(TLD)/whmcs/cart.php?a=view to view what is currently in your cart. Thanks GCM_IT, that was a big help. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.