cart using checkbox on attribute

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
bis-zone
New Member
New Member
Posts: 9
Joined: Fri May 14, 2010 11:15 am

cart using checkbox on attribute

Post by bis-zone »

I have developed a complet ecommerce site
I want to have a checkbox in only items that have a second attribute set.(gift wrapped) This will always be the second attribute.
I used
{if isset($attribute_count) && $attribute_count gt 1}
    giftwrapped    
{/if}
But  cannot seem to get the javascript to work. What I want to happen when they click the checkbox the second attribute selected index=1 and when they untick the box the selected index =0
The attributes are hidden by using a div in thecart template as below

{* add to cart template *}
{$formstart}


{if isset($attribute_count) && $attribute_count gt 0}
  {foreach from=$attributes item='attrib'}
    {$attrib->name}: {$attrib->control}
  {/foreach}
{/if}


{if isset($attribute_count) && $attribute_count gt 1}
    Gift Wrapped    
{/if}

{$formend}



I do not want to use a dropdown but a checkbox
Post Reply

Return to “CMSMS Core”