be090129 / substruct

Automatically exported from code.google.com/p/substruct
0 stars 0 forks source link

Items in an order doesn't get the quantity changed after the first checkout (related with issue 61) #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add one item to the cart.
2. Checkout (there it shows the cart contents)
3. Select shipping (there it shows the order contents, that now is the same)
4. Go back and add another same item.
5. Checkout (there it shows the cart contents, now it shows two in the
quantity)
6. Select shipping (there it shows the order contents, that now is one in
the quantity again). The order is not updating its order_line_items
collection of already existing items from the cart.

What is the expected output? What do you see instead?
It should show two units in the select shipping page, the second time.
Instead it shows only one.

What version of the product are you using? On what operating system?
trunk. Ubuntu 7.10

Please provide any additional information below.
It doesn't just drop off one, it doesn't update que quantity of what is
already there, if you add a new item that wasnt there it will be included.

@order.order_line_items = @items

This is not happening as expected.

I don't know why yet, appears to be that crazy problem of assigning objects
by id and things stop working and dont gave errors. (take a look at issue 104)

As in the title, it was discussed in issue 61, and closed without being
completelly fixed.

Probably to fix that I will need to start to make some integration tests,
as all the rest of the system was tested and this problem deppends of the
flow of various controllers.

This is the craziest error that I saw until now.

Original issue reported on code.google.com by edmundo...@gmail.com on 23 Jul 2008 at 2:29

GoogleCodeExporter commented 8 years ago
Follows a patch. Im just clearing the collection and reacreating its objects 
taking
care of it NOT being the same as the cart objects. Instead of link, I clone it.

Regards.

Original comment by edmundo...@gmail.com on 24 Jul 2008 at 3:55

Attachments:

GoogleCodeExporter commented 8 years ago
Patch solves this problem, but it appears you can still remove all items from 
your
cart and it doesn't update that page. Perhaps not the same bug, but a related 
one.

I'll be fixing both...

Original comment by subim...@gmail.com on 12 Aug 2008 at 6:50

GoogleCodeExporter commented 8 years ago
Fixed in r117

Original comment by subim...@gmail.com on 15 Aug 2008 at 8:56