Jump to content

Continue Shopping in Default Cart


Impact-John

Recommended Posts

Yes thats the line (with the input bit at the beginning) and I put it into the viewcart.tpl

That is only one part though there are lots of edits to do. One of them is to remove the unset command at the bottom of products.tpl another is to add the empty cart code (along with the java script)

You can look at what I did on my site.(but don't order unless you want the item)

Edited by sparky
Link to comment
Share on other sites

ok i got the continue shopping to work and i got the red text to remove an item but it wont remove item on click

 

 

{foreach key=num item=product from=$products}

<tr class="carttableproduct"><td>

<strong><em>{$product.productinfo.groupname}</em> - {$product.productinfo.name}</strong>{if $product.domain} ({$product.domain}){/if}<br />

{if $product.configoptions}

{foreach key=confnum item=configoption from=$product.configoptions} » {$configoption.name}: {if $configoption.type eq 1 || $configoption.type eq 2}{$configoption.option}{elseif $configoption.type eq 3}{if $configoption.qty}{$LANG.yes}{else}{$LANG.no}{/if}{elseif $configoption.type eq 4}{$configoption.qty} x {$configoption.option}{/if}<br />{/foreach}

{/if}

</td><td align="center"><strong>{$product.pricingtext}{if $product.proratadate}<br />({$LANG.orderprorata} {$product.proratadate}){/if}</strong></td></tr>

{foreach key=addonnum item=addon from=$product.addons}

<tr class="carttableaddon"><td><strong>{$LANG.orderaddon}</strong> - {$addon.name}</td><td align="center"><strong>{$addon.pricingtext}</strong></td></tr>

{/foreach}

<tr class="carttableconfig"><td><a href="{$smarty.server.PHP_SELF}?a=confproduct&i={$num}" style="color:#009900;">[{$LANG.carteditproductconfig}]</a> <a href="#" onclick="removeItem('p','{$num}');return false" style="color:#cc0000;">[{$LANG.cartremove}]</a></td><td> </td></tr>

{/foreach}

Link to comment
Share on other sites

once again the senior members of the whmcs forums have come through i was missing the java script code at the very top of the page for the remove items to work thanks again Sparky.

{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}

Link to comment
Share on other sites

  • 4 months later...

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