Page 1 of 1

Cart2 Template Help

Posted: Fri Feb 27, 2015 8:27 pm
by welsfordvfd
This is probably something easy to do but I am having troubles making it work. For my "add to cart" template I want the user to be directed to the viewcart page upon clicking the "add to parts list". The following is my template:

Code: Select all

{* add to cart template *}
{if isset($cart_error)}
{cgerror}{$cart_error}{/cgerror}
{/if}

{$formstart}{strip}

{if isset($single_option)}
  {* this is used if the sku passed to the Cart2 module was the sku of an option of a product *}
  <input type="hidden" name="{$actionid}cart_options" value="{$single_option}"/>
{elseif isset($options)}
  {* we have multiple options *}
  <select name="{$actionid}cart_options">
    {html_options options=$options}
  </select>
{else}
 
{/if}
<input type="submit" name="{$submitname}" value="Add To Part List"/>
{/strip}{$formend}
with the current setup when clicking "add to parts list" the page remains the same and the "view cart" button must be selected.

If anyone has any suggestions that would be awesome!
Cheers,

Re: Cart2 Template Help

Posted: Sun Mar 01, 2015 4:41 pm
by 10010110
Usually you set the page to redirect to in the module settings. Create a new page with {Cart2 action="viewcart"} and in the module settings select that page from the dropdown of pages to redirect to.