Impact-John Posted November 23, 2008 Share Posted November 23, 2008 i have noticed there is no Continue Shopping Button in the default cart and i am trying everything in my power to get it to have one but cant seem to get it to work at all but was this a missed part of the default cart? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 23, 2008 Share Posted November 23, 2008 Works in mine... after a few edits of the tpl's 0 Quote Link to comment Share on other sites More sharing options...
PrimaryTarget Posted November 23, 2008 Share Posted November 23, 2008 Hey Sparky, Which tpl did you edit ?? did you just add the type="button" value="Continue Shopping" onclick="window.location='cart.php'" /><br /><input did you just add this into one of your tpls for ordering ? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 23, 2008 Share Posted November 23, 2008 (edited) 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 November 23, 2008 by sparky 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 could you list the unset command that you removed sparky would help greatly i think i can find the java script you did but just incase could you post as well 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 i have my continue shopping button and it does go back to the cart.php but it does not keep the items in the cart at all from previous order i need to what i need to put and where exactly to get it all working. 0 Quote Link to comment Share on other sites More sharing options...
PrimaryTarget Posted November 23, 2008 Share Posted November 23, 2008 Thats the problem I had, It would not keep the items in the cart when I tried it. 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 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} 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 it must be the java script i am guessing but i am unaware of where to put the java script for it to work if i put it in the viewcart.tpl my cart page turns white so any help as to where i want to put the java script would help greatly here 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 23, 2008 Share Posted November 23, 2008 Right at the bottom of products.tpl {php} if (isset($_SESSION["cart"])) { unset($_SESSION["cart"]); } {/php} 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 (edited) ok i already removed that and got it to add more items to the cart and that is all fine, and added the remove links to the cart as well but it wont remove the item from the cart on click im available on msn if you are john_rafuse1@hotmail.com Edited November 23, 2008 by Impact-John 0 Quote Link to comment Share on other sites More sharing options...
Impact-John Posted November 23, 2008 Author Share Posted November 23, 2008 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} 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 23, 2008 Share Posted November 23, 2008 No Problem... As I always have my computer on I had a big list of people to add to my MSN messenger that didn't show until I logged off then back on again. I have added all of them now. 0 Quote Link to comment Share on other sites More sharing options...
boyandhisdog Posted April 6, 2009 Share Posted April 6, 2009 Beautiful guys. Thanks for inventing the wheel! 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.