liqiusheng / silverstripe-ecommerce

Automatically exported from code.google.com/p/silverstripe-ecommerce
0 stars 0 forks source link

Product Variation global price update link issues #421

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
eCommerce version affected: r3041
SilverStripe version: 2.4.7? (version not shown)
Browser/Operating System used: Firefox 12
Module: ecommerce_product_variation

When editing a product that has product variations, on the detail tab there is 
the following:
"Click here to update all the variations with the price above."

This link makes two assumptions that are likely to often cause problems:
1. The "price above" must already be saved. If the user enters a price and does 
NOT save, then whatever the saved price was is what is actually set onto the 
variations, Not what is currently shown in the price field.
2. The link assumes that SiteTree::enable_nested_urls(); is being used on the 
site. If it is not, then the link may be broken depending on the location of 
the product in the site tree.

Original issue reported on code.google.com by st...@klundthosmer.com on 16 Jul 2012 at 11:35

GoogleCodeExporter commented 8 years ago
Thank you for reporting these issues.  They are SUPER useful and I will try to 
fix all of them ASAP. 

Original comment by nfranc...@gmail.com on 17 Jul 2012 at 12:45

GoogleCodeExporter commented 8 years ago
I tried (1) and it actually works fine to me - which even I was surprised 
about... Here is what I did:

1. opened existing product (not new one)
2. changed price but did NOT save product
3. created variations as per usual
RESULT: variations reflect new price

Original comment by nfranc...@gmail.com on 17 Jul 2012 at 1:28

GoogleCodeExporter commented 8 years ago
I will perform a few tests and see if I can reproduce different scenarios.

Original comment by st...@klundthosmer.com on 19 Jul 2012 at 11:57

GoogleCodeExporter commented 8 years ago
Ah, I see you are performing a slightly different scenario than I am.
Your scenario as described does work as you describe, however mine is slightly 
different.

1. Open existing product (not new one)
2. Change price but do NOT save product
3. Click "here" link in the sentence: "Click here to update all the variations 
with the price above." (just below the Content->Details->Price field)

Result:
1. If SiteTree::enable_nested_urls(); is not enabled, an error occurs if the 
product is not at the correct place within the site tree.
OR
2. If SiteTree::enable_nested_urls(); is enabled or the product is in the 
correct location, the CMS refreshes back at the Product search.  Click on 
product that was being edited.  Then, both the Product Price and all existing 
product variations prices remain unchanged.

Original comment by st...@klundthosmer.com on 20 Jul 2012 at 8:40

GoogleCodeExporter commented 8 years ago
thank you so much for providing more detail!

Original comment by nfranc...@gmail.com on 22 Jul 2012 at 10:53

GoogleCodeExporter commented 8 years ago
thank you so much for providing more detail!

The best way to solve this is to turn the link into a checkbox.  If ticked, the 
product variations will be updated.

Original comment by nfranc...@gmail.com on 23 Jul 2012 at 5:35

GoogleCodeExporter commented 8 years ago
Yes I think that would be a good idea.  Also eliminates the Nested Urls issue.

Original comment by st...@klundthosmer.com on 24 Jul 2012 at 12:37