Hello
I want that when someone click on 10 Stuck the quantity and price will be changed. If someone click on 20 Stuck the quantity changed to 20 and 25.1% discount will be applied to the price.
What I’ve done till now is,
First I’m doing for only quantity that the quantity will be changed.
I put each of them in ANCHOR tags, and then in DT tag I put the DATA-QTY so I can use it on JQUERRY. This is how my PRICEINFO.tpl looks like
[{foreach from=$oDetailsProduct->loadAmountPriceInfo() item=priceItem name=amountPrice}]
<a href"#">
[{oxscript include=“js/libs/discount.js” priority=2}]
[{if $priceItem->oxprice2article__oxaddperc->value}]
[{$priceItem->oxprice2article__oxaddperc->value}]% [{oxmultilang ident=“DISCOUNT”}]
[{else}]
[{block name=“details_productmain_price”}]
[{$priceItem->fbrutprice}] [{$currency->sign}]
[{if $oDetailsProduct->getUnitName() and $priceItem->fbrutamountprice}]
([{$priceItem->fbrutamountprice}] [{$currency->sign}] / [{$oDetailsProduct->getUnitName()}])
[{/if}]
[{/block}]
[{/if}]
[{/foreach}]
And my jquerry looks like this
$(’.dl-horizontal > a’).click(function(){
$(this).each(function() {
$(this).html();
$(’#amountToBasket’).val(‘data-qty’);
});
});
Any Idea what I’m doing wrong??
Because in $(’#amountToBasket’).val(‘data-qty’); when i put 10 instead of ‘data-qty’ and click on the link in my shop, and click on link it changes the quantity to 10. But on every link it does the same. I want that when someone click on 10 Stuck the quantity change to 10 and when click on 20 stuck it change to 20.
I’ll be really happy if someone help me regarding that.
Thanks
Abdullah