Basket change quantity

Hi,

I would like to have a increase [+] and decrease [-] button in my basket beside each product, which changes the quantity/amount of products i want of each.
Is there some already made code out there, which allows this?

[B]Solution:[/B]
http://forum.oxid-esales.com/showthread.php?p=128035

Many thanks to @KaiNeuwerth from:
digidesk - media solutions

Awesome work! They know what they are doing

i’m not sure if there is a ready for copy-paste code for changing the quantity in the basket, but you can use the jquery ui spinner to make crossbrowser +/- buttons: http://jqueryui.com/spinner/
And after that you need to submit the form (basically trigger the update button) to update the quantity and recalculate the prices.

easy way would be to submit the form after each pressing of the +/- buttons, which would make the page reload every time you press the button.
Or the more “pro way” would be integrating a timer before reloading the page after pressing the button, this way the page wouldnt be reloaded immediately so you could click +/- button several times before reloading and setting the final quantity

There was the posibility to change quantities and update the basket via button in “Basic” theme - maybe you can take some of this code?

Thanks guys :slight_smile: hope i can get something done, with my limited amount of skills

[QUOTE=Hebsacker;124030]There was the posibility to change quantities and update the basket via button in “Basic” theme - maybe you can take some of this code?[/QUOTE]

Isn’t that possible in Azure (sorry, no shop installation here)? If so - it’s a bug, isn’t it.

right you are - same possibility to change and update prices here in basket overview, I was a step too far in checkout process

To difficult for me. Such a shame they havent added this. is there really not a place where you can get code to oxid, like joomla etc.? must everything be written by yourself. not easy to complete your store, the way you want it, without being really good at coding or have $$.

Guess a delete button for articles, is just as difficult.
edit: http://forum.oxid-esales.com/showthread.php?t=18837&langid=2 http://forum.oxid-esales.com/showthread.php?t=6191 etc

or is there some modules, which has this?

I just added a plus / minus - button (i don’t know the basic theme). Search in your page/checkout/inc/basketcontents.tpl for

<input id="am_[{$smarty.foreach.basketContents.iteration}]" type="text" class="textbox" name="aproducts[[{ $basketindex }]][am]" value="[{ $basketitem->getAmount() }]" size="2">

and change that to

<button type="submit" class="basketminusbtn" name="updateBtn" onclick='javascript:var i=$(this).parent().find("input");var j=i.val();j--;i.val(j)'> </button>
<input id="am_[{$smarty.foreach.basketContents.iteration}]" type="text" class="textbox" name="aproducts[[{ $basketindex }]][am]" value="[{ $basketitem->getAmount() }]" size="2">
<button type="submit" class="basketplusbtn" name="updateBtn" onclick='javascript:var i=$(this).parent().find("input");var j=i.val();j++;i.val(j)'> </button>

jQuery ist required.
This is a hotfix. You better place the Javascript in a function in a better place.

You can see it here (link)

@c4yolli,
Thanks a lot! we need more people like you in here.

I failed to get it to work in the minibasket.tpl. If i put that in there +
<form name=“basket[{ $basketindex }]” action="[{ $oViewConf->getSelfActionLink() }]" method=“post”>
</form>
around it + foreach, then it just reloads the page. suggestions?

less important at the moment:
This is awesome for now and maybe in the future, there could be done some changes, so its allowed to click multiple times on buttons - now it only in/decreases by 1, when you click more then once, plus it reloads the pages, which it might not need?

thanks again! :slight_smile:

http://forum.oxid-esales.com/showthread.php?p=128035

Many thanks to @KaiNeuwerth from:
digidesk - media solutions

Great, isn’t it? :slight_smile:

@Marco,
yes def.! we need more people like him :wink: