Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Quantity Select option (help) Rate Topic   - - - - -

 
  • Cached
  • Member
  • Members
  • Join Date: 02-Mar 11
  • 49 posts

Posted 17 May 2011 - 05:26 AM #1

hi guys


can someon help me how to work this out

Drop Down Option Select Quantity

this file will be located at
skins/basic/customer/addons/product_configurator/hooks/products/view_main_info.override.tpl

see this images
Posted Image

 
  • Cached
  • Member
  • Members
  • Join Date: 02-Mar 11
  • 49 posts

Posted 17 May 2011 - 07:12 AM #2

teach me how to past the value into the cart

 
  • Cached
  • Member
  • Members
  • Join Date: 02-Mar 11
  • 49 posts

Posted 18 May 2011 - 03:37 PM #3

I want to know how to pass the Value in Cart, i dont know how to locate the value of each Product ID

here is my Code in

skins\your_skin\customer\addons\product_configurator\hooks\products\view_main_info.override.tpl


<div class="cm-reload-{$obj_id|default:$product.product_id}" id="content_pc_{$step.step_id}_update">
<div id="content_pc_{$step.step_id}"{if !$smarty.foreach.configurator_steps.first} class="hidden"{/if}>
{if $smarty.foreach.configurator_steps.first}
{assign var="active_tab" value="pc_`$step.step_id`"}
{/if}
<table cellpadding="2" cellspacing="0" border="0" width="100%" class="product-configuration">
{foreach from=$step.product_configurator_groups item="po" name="groups_name"}
<tbody>
<tr>
<td colspan="5"{if !$smarty.foreach.groups_name.first} class="field-title"{/if}>
<div class="info-field-title">
<div class="float-right">{include file="common_templates/popupbox.tpl" id="description_`$po.group_id`" link_text="?" text=$po.configurator_group_name href="products.configuration_group?step_id=`$step.step_id`&group_id=`$po.group_id`&product_id=$product_id" show_brackets=true}</div>
{$po.configurator_group_name}
</div>
</td>
</tr>
</tbody>
{***************** if there is only one product and it is required - just show it **************}
{if $po.products_count == "1" && $po.required == "Y"}
{foreach from=$po.products item="group_product"}
<tbody>
<tr>
<td colspan="4" width="100%">
<input type="hidden" id="group_one_{$po.group_id}" name="product_data[{$product_id}][configuration][{$po.group_id}]" value="{$group_product.product_id}" />
{include file="common_templates/popupbox.tpl" id="description_`$po.group_id`_`$group_product.product_id`" link_text=$group_product.product text=$group_product.product href="products.configuration_product?group_id=`$po.group_id`&product_id=`$group_product.product_id`"}</td>
<td> {if $show_price_values == true}<span class="price">{include file="common_templates/price.tpl" value=$group_product.price}</span>{/if} </td>
</tr>
</tbody>
{/foreach}
{else}
{***************** display the list of products with ability to choose **************}
{if $po.configurator_group_type == "S"}
<tbody>
{if $po.products}
<tr>
<td width="100%" colspan="4">
<select name="product_data[{$product_id}][configuration][{$po.group_id}]" id="group_{$po.group_id}" onchange="fn_change_options('{$obj_id|default:$product.product_id}', '0'); fn_check_compatibilities({$po.group_id},'select','{$po.configurator_group_type}');">
<option id="product_0_{$po.group_id}" value="0">{$lang.none}</option>
{foreach from=$po.products item="group_product"}
{if ($group_product.is_edp != "Y" && $group_product.tracking != "D" && ($group_product.amount <= 0 || $group_product.amount < $group_product.min_qty) && $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y") || ($group_product.zero_price_action != "P" && !$group_product.price|floatval)}
{assign var="disable_product" value=true}
{else}
{assign var="disable_product" value=false}
{/if}
<option class="{if $disable_product}cm-configurator-disabled{/if}" id="product_{$group_product.product_id}" value="{$group_product.product_id}" {if $group_product.selected == "Y" && ($group_product.amount > 0 || $settings.General.inventory_tracking != "Y" || $settings.General.allow_negative_amount == "Y")}selected="selected"{assign var="selected_exist" value=true}}{/if} {if $group_product.disabled || $disable_product}disabled="disabled"{/if}>{$group_product.product}{if $show_price_values == true} - {include file="common_templates/price.tpl" value=$group_product.price}{/if}{if $group_product.recommended == "Y"} {$lang.recommended}{/if}</option>
{/foreach}
</select>
</td>
<td>
<div id="select_{$po.group_id}">
{foreach from=$po.products item="group_product" name="descr_links"}
{if $group_product.selected == "Y" || $po.required == "Y" && !$selected_exist && $smarty.foreach.descr_links.first}
{assign var="cur_class" value=""}
{else}
{assign var="cur_class" value="hidden"}
{/if}
{include file="common_templates/popupbox.tpl" id="description_`$po.group_id`_`$group_product.product_id`" link_text=$lang.details text=$group_product.product href="products.configuration_product?group_id=`$po.group_id`&product_id=`$group_product.product_id`" link_meta=$cur_class}
{/foreach}
</div>
</td>
</tr>
{else}
<tr>
<td width="100%" colspan="5">
<span class="price strong">{$lang.text_no_items_defined|replace:"[items]":$lang.products}</span>
</td>
</tr>
{/if}
<tr></tbody>
<td>
<td>
{elseif $po.configurator_group_type == "R" }
{if $po.products}
<tbody id="group_{$po.group_id}">
{foreach from=$po.products item="group_product" name="vars"}
{if ($group_product.is_edp != "Y" && $group_product.tracking != "D" && ($group_product.amount <= 0 || $group_product.amount < $group_product.min_qty) && $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y") || ($group_product.zero_price_action != "P" && !$group_product.price|floatval)}
{assign var="disable_product" value=true}
{else}
{assign var="disable_product" value=false}
{/if}
{if $smarty.foreach.vars.first && $po.required != "Y"}
<tr>
<td><input id="group_{$po.group_id}_product_0" type="radio" class="radio {if $disable_product}cm-configurator-disabled{/if}" name="product_data[{$product_id}][configuration][{$po.group_id}]" value="0" onclick="fn_change_options('{$obj_id|default:$product.product_id}', '0'); fn_check_compatibilities({$po.group_id}, 0, '{$po.configurator_group_type}');" checked="checked" {if $group_product.disabled || $disable_product}disabled="disabled"{/if} /></td>
<td> </td>
<td> </td>
<td> {$lang.none}</td>
<td> </td>
</tr>
{/if}

<tr>
<td><input type="radio" class="radio cm-no-change {if $disable_product}cm-configurator-disabled{/if}" id="group_{$po.group_id}_product_{$group_product.product_id}" name="product_data[{$product_id}][configuration][{$po.group_id}]" value="{$group_product.product_id}" onclick="fn_change_options('{$obj_id|default:$product.product_id}', '0'); fn_check_compatibilities({$po.group_id},{$group_product.product_id}, '{$po.configurator_group_type}');" {if $group_product.selected == "Y" && false == $disable_product}checked="checked"{/if} {if $group_product.disabled == true || $disable_product}disabled="disabled"{/if} /></td>
<td><div class="form-field{if !$capture_options_vs_qty} product-list-field{/if}{if $settings.Appearance.quantity_changer == "Y"} changer{/if}" id="qty_{$obj_prefix}{$obj_id}">
<label for="qty_count_{$obj_prefix}{$obj_id}">{$quantity_text|default:$lang.quantity}:</label>
{if $product.qty_content}
<select name="product_data[{$obj_id}][amount]" id="qty_count_{$obj_prefix}{$obj_id}">
{assign var="a_name" value="product_amount_`$obj_prefix``$obj_id`"}
{assign var="selected_amount" value=false}
{foreach name="`$a_name`" from=$product.qty_content item="var"}
<option value="{$var}" {if $product.selected_amount && ($product.selected_amount == $var || ($smarty.foreach.$a_name.last && !$selected_amount))}{assign var="selected_amount" value=true}selected="selected"{/if}>{$var}</option>
{/foreach}
</select>
{else}
{if $settings.Appearance.quantity_changer == "Y"}
<div class="center valign cm-value-changer">
<a class="cm-increase"><img src="{$images_dir}/icons/up_arrow.gif" width="11" height="5" border="0" /></a>
{/if}
<input type="text" size="5" class="input-text-short cm-amount" id="qty_count_{$obj_prefix}{$obj_id}" name="product_data[{$obj_id}][amount]" value="{$default_amount}" />
{if $settings.Appearance.quantity_changer == "Y"}
<a class="cm-decrease"><img src="{$images_dir}/icons/down_arrow.gif" width="11" height="5" border="0" /></a>
</div>
{/if}
{/if}
</div></td>
<td>{include file="common_templates/image.tpl" obj_id=$obj_id_prefix images=$group_product.main_pair object_type="product" show_thumbnail="Y" image_width=$settings.Thumbnails.product_lists_thumbnail_width image_height=$settings.Thumbnails.product_lists_thumbnail_height}</td>
<td width="100%">{include file="common_templates/popupbox.tpl" id="description_`$po.group_id`_`$group_product.product_id`" link_text=$group_product.product text=$group_product.product href="products.configuration_product?group_id=`$po.group_id`&product_id=`$group_product.product_id`"}</td>
<td class="right"> {if $show_price_values == true}<span class="price">{include file="common_templates/price.tpl" value=$group_product.price}</span>{/if}{if $group_product.recommended == "Y"} <strong>{$lang.recommended}</strong>{/if}</td>
</tr>
{/foreach}
<tr></tbody>
<td>
<td>
{else}
<span class="price strong"> {$lang.text_no_items_defined|replace:"[items]":$lang.products}</span>
{/if}
{elseif $po.configurator_group_type == "C"}
{if $po.products}
<tbody id="group_{$po.group_id}">
{foreach from=$po.products item="group_product"}

{if ($group_product.is_edp != "Y" && $group_product.tracking != "D" && ($group_product.amount <= 0 || $group_product.amount < $group_product.min_qty) && $settings.General.inventory_tracking == "Y" && $settings.General.allow_negative_amount != "Y") || ($group_product.zero_price_action != "P" && !$group_product.price|floatval)}
{assign var="disable_product" value=true}
{else}
{assign var="disable_product" value=false}
{/if}
<tr>
<td>
<input type="checkbox" class="checkbox cm-no-change {if $disable_product}cm-configurator-disabled{/if}" id="group_{$po.group_id}_product_{$group_product.product_id}" name="product_data[{$product_id}][configuration][{$po.group_id}][]" value="{$group_product.product_id}" onclick="fn_change_options('{$obj_id|default:$product.product_id}', '0'); fn_check_compatibilities({$po.group_id},{$group_product.product_id}, '{$po.configurator_group_type}');" {if $group_product.selected == "Y" && false == $disable_product}checked="checked"{/if} {if $group_product.disabled == true || $disable_product}disabled="disabled"{/if} /></td>
<td> </td>
<td>{include file="common_templates/image.tpl" obj_id=$obj_id_prefix images=$group_product.main_pair object_type="product" show_thumbnail="Y" image_width=$settings.Thumbnails.product_lists_thumbnail_width image_height=$settings.Thumbnails.product_lists_thumbnail_height}</td>
<td width="100%">{include file="common_templates/popupbox.tpl" id="description_`$po.group_id`_`$group_product.product_id`" link_text=$group_product.product text=$group_product.product href="products.configuration_product?group_id=`$po.group_id`&product_id=`$group_product.product_id`"}</td>
<td class="right"> {if $show_price_values == true}<span class="price">{include file="common_templates/price.tpl" value=$group_product.price}</span>{/if}{if $group_product.recommended == "Y"} <strong>{$lang.recommended}</strong>{/if}</td>
</tr>
{/foreach}
<tr></tbody>
<td>
<td>
{else}
<p class="price">{$lang.text_no_items_defined|replace:"[items]":$lang.products}</p>
{/if}

{/if}
{/if}
{/foreach}
</table>
</div>
<!--content_pc_{$obj_id|default:$product.product_id}_update--></div>