Jump to content

Exactly How To Allow Customers To Remove Items From Their Shopping Cart


Recommended Posts

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.

Link to comment
Share on other sites

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>  

Link to comment
Share on other sites

  • 4 weeks later...

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated