Cart2 Template Help

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
welsfordvfd
Forum Members
Forum Members
Posts: 20
Joined: Tue Dec 16, 2014 4:48 pm

Cart2 Template Help

Post 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,
10010110
Translator
Translator
Posts: 224
Joined: Tue Jan 22, 2008 9:57 am

Re: Cart2 Template Help

Post 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.
Post Reply

Return to “Modules/Add-Ons”