Jump to content

insert product quantity of cart insto the attributes in prestashop 1.5.4.1


Ron morales
 Share

Recommended Posts

in product.tpl l'm trying to enter the stock in picture, within the attributes, but when you insert the number of products that the customer wants to buy does not work outside the atribuitos posting the code works perfectly for me over the forum limits my publications thanks

this is my code modify

{if ($group.default == $id_attribute)}
										{$default_colorpicker = $id_attribute}
									{/if}
									{/foreach}
								</ul>
								<input type="hidden" class="color_pick_hidden" name="{$groupName}" value="{$default_colorpicker}" />
							{elseif ($group.group_type == 'radio')}
								<ul>
									{foreach from=$group.attributes key=id_attribute item=group_attribute}
										<li>
											<div style="float: left;padding-top: 10px;"><input  type="radio" class="attribute_radio" name="{$groupName}" value="{$id_attribute}" {if ($group.default == $id_attribute)} checked="checked"{/if} onclick="findCombination();getProductAttribute();" />
											<span style="float:left; width:100px;">{$group_attribute|escape:'htmlall':'UTF-8'}	</span></div>
	<!-- availability -->
	
        <div class="imagen_stock"><div class="prod_info_stock"><span>Stock</span></div>
      <div class="prod_info_stock_bien">
      	<p id="availability_statut"{if ($product->quantity <= 0 && !$product->available_later && $allow_oosp) OR ($product->quantity > 0 && !$product->available_now) OR !$product->available_for_order OR $PS_CATALOG_MODE} {/if}>
				
				<span id="availability_value"{if $product->quantity <= 0} class="warning_inline" {else}class="en_stock" {/if}>
                
                {if $product->quantity <= 0}{if $allow_oosp}{$product->available_later}{else}{l s='This product is no longer in stock'}{/if}{else}{$product->available_now}{/if}</span>				
			</p>
   
   </div><!--prod_info_stock-->
    </div>
<!-- quantity wanted -->

			<p id="quantity_wanted_p"{if (!$allow_oosp && $product->quantity <= 0) OR $virtual OR !$product->available_for_order OR $PS_CATALOG_MODE} style="display: none;"{/if}>
				<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}{if $product->minimal_quantity > 1}{$product->minimal_quantity}{else}1{/if}{/if}" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} />
			</p>
										</li>
									{/foreach}
								</ul>
							{/if}
							</div>
						</fieldset>
					{/if}
				{/foreach}
				</div>
			{/if}

post-319618-0-28830700-1379615402_thumb.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More