:-) NOW it works flawlessly!

Thanx again, Kai

Alfonsas Cirtautas schrieb:
and  hidden field:
<input type="hidden" name="aproducts[[{ $basketindex }]][remove]" value="1">

because we need both, product list, and clicked removeBtn to remove item

--------------------------------------------------
From: "Alfonsas Cirtautas" <[email protected]>
Sent: Friday, June 19, 2009 10:40 AM
To: <[email protected]>
Subject: Re: [oxid-dev-general] delete-buttons in basket

ok, I see

then you don't need hidden fields.

Just to it the old way, make separate form for each basket row,
with regular add / remove buttons.

greetings,
Alfonsas
--------------------------------------------------
From: "Kai Gazmaga" <[email protected]>
Sent: Friday, June 19, 2009 9:55 AM
To: <[email protected]>
Subject: Re: [oxid-dev-general] delete-buttons in basket

Yes, you are right, but these customers mostly buy few products  ;-)

But sad to have to say: it does not work so good as i first thought. The delete-feature works, but I also added an update-button behind the amount-input for each basketitem ... that does not work when inserting the hidden field. Any idea for a solution?

Greetings, Kai

Alfonsas Cirtautas schrieb:
Nice to hear,

actually by doing this you are removing good feature.

Imagine simple situation:
If customer puts 50 products to basket, an wants to remove 45 of them, I would get mad clicking remove button :)

greetings,
Alfonsas

--------------------------------------------------
From: "Kai Gazmaga" <[email protected]>
Sent: Friday, June 19, 2009 9:30 AM
To: <[email protected]>
Subject: Re: [oxid-dev-general] delete-buttons in basket

Thank you very much! Works flawlessly ...

Alfonsas Cirtautas schrieb:
Hello  Kai,

everything is pretty simple there :)

1. open template "out/basic/tpl/basket.tpl"

2. add hidden form field :
<input type="hidden" name="removeBtn" value='1'>

3. replace checkboxes with remove buttons
<input type="submit" name="aproducts[[{ $basketindex }]][remove]" value="remove">

4. remove select all checkbox and remove button from bottom of form

5. make it all look nice :)



I even attached a patch of nice looking basket.tpl for you !

enjoy,
Alfonsas


--------------------------------------------------
From: "Kai Gazmaga" <[email protected]>
Sent: Thursday, June 18, 2009 10:21 PM
To: "Oxid Mailingliste" <[email protected]>
Subject: [oxid-dev-general] delete-buttons in basket

Hello folks,

i want to have a delete-button behind each product in the cart wich removes the product from the cart without selecting the checkbox which is dedicated for deletion-selection. (This box is going to be removed in the end) I do not really understand the way oxid handles the requests ... one form, 2 different actions triggered by 2 different submit-buttons. This must be handled by evaluating the different values of name or id of the submit-buttons - at least this is what I think. I found out, that the checkAll-checkbox is handled by the oxid ajax / javascript-object but it dit not really help. There is a function oxid.form.select() but i wasn't able to use it in a propper way to make it work. I guess, this function is the way to solve the problem in principle.

I will be thankfull for every hint.

Regards, SubNet-One
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

------------------------------------------------------------------------


_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general
_______________________________________________
dev-general mailing list
[email protected]
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to