Openfoodnetwork: Product master variant price

Created on 6 Nov 2018  路  24Comments  路  Source: openfoodfoundation/openfoodnetwork

Description

When a new product is created the price gets set on the master variant. If a product is edited later, there is a field for price on the edit product screen, but it does not update the prices in the frontend, as they are taken from the price on the variants, not the master price on the product.

Expected Behavior

Fields in product edit page should work

Actual Behavior

The price field does not work as expected

Steps to Reproduce


  1. Create a product with price: 5
  2. Go to edit product and change the price field in the product details section of edit product.
  3. The price in the frontend stays the same
  4. Edit the price on the variant, and it will change correctly

Screenshot

screenshot from 2018-11-06 13-04-02

Context

Discovered by Luis while looking at Spree Upgrade issues.

Severity

S4. The UI is confusing to the user and appears to be broken.

Possible Fix

Remove that price field from the product edit page, as it is non-functional.

bug-s3 good first issue hackathon

Most helpful comment

I think Matt's solution is a good one, to hide this field within the UI on the Edit Product Details screen.

All 24 comments

We've had a couple of users her have issues with this, Locavore and a new FA Calderdale.

I've tried with Audacious Veg and have attached a video of the issue to add to Matt's details above http://recordit.co/jWXcMH2Xec

I think Matt's solution is a good one, to hide this field within the UI on the Edit Product Details screen.

Yes let's hide that field !!!

Same as #1788 ? Or related?

Yes, it's a duplicate. The good news is that we agree to remove the field from the product edit page and that will fix the problem.
@sauloperez can you confirm it's a duplicate?

Yep, I think so.

Shall we go with the proposal here and just remove that field from the product page then? I can do the PR in 2 minutes...

yeah, @myriamboure agreed as well. lets do it.
and we close #1788

Ah, so we have to wait for #3055 ?

hmmm.. I dont see the new.html.erb in #3055 only edit and form...

It's on the product edit page, right?

sorry, my mistake, it's the edit page and you need to do this one on top of #3055, correct.

3055 is merged so this is ready to be done.

Hi @PLSV How is this coming along? Have you made any progress or do you have any questions?

Hey @lin-d-hop. I have a couple of questions that I need help with. Let me ping you on slack.

Just a comment, with the work we have done on "product chain" and some first inception on "variable pricing for different customer groups", there is a chance that we need that master price field (I'll share soon the first brain dump I had on this but no need here). Just want to make sure we just "hide" it and don't delete it. No objection to hide it meanwhile as there is a confusion yes but I understood some logic for this master price when doing some discovery job on pricing issues.

hey @myriamboure, maybe useful to clarify: there's no such thing as master price, there's a price on the master variant. The master variant is a variant every product has, it's the default variant that is used in Spree if no variants are defined. In OFN additionally we have the standard variant which is a normal variant that is always created when a product is created. So, when you create a product in OFN, you get a hidden variant called master and a visible variant called standard. Currently, the price in the master variant is never used, only the one in the standard variant. I hope this makes sense :-)

I am curious about what plans do you have for variants and prices in the product chain world, I'd suggest we remove pricing completely from the catalog and make it an external component. That was what I have seen in more advanced systems. Catalog is just the product structure, pricing is another thing that depends on catalog but doesn't belong to it.

Yes yes yes and again yes @luisramos0 ! I think we need to distinguish "offers" from "catalog". The catalog is about the products available or that will be available at some point. Offers is about the price you give for each product for a given customer type. Then in term of UX I'm not sure we should separate them completely as sellers are so used to have prices in their catalog... I will share some thoughts soon, but anyway, we will discuss on discourse, it doesn't impact that issue :-)

cool, I didnt mean to separate them on the UI, I meant internally.

Hiya @PLSV 馃憢

Just wondering where you're at with this work, been a couple of weeks since the last activity on the feed so checking if you're still working on it? We try and keep the columns as fresh as possible, so when something's sitting without activity for a while we check in.

How's it going? Need some more help? Need to put it on hold for a bit till you get some more free time? 馃槃

Hey @daniellemoorhead: Haven't been working on it for some time. I don't think I can actively work on the issue for the time being. And I am still learning about rails more in-depth, especially through the OFN codebase whenever I have time.

Wish to put it on hold for some time till I'm free, but you can assign this issue to someone else if need be.

No worries at all @PLSV!

There are loads of other issues that are potentially a little easier for someone learning rails, if you're needing some guidance on finding one jump on slack and ask the crowd in the dev channel - someone is sure to have a list of them for you 馃槃

I'll pop this one back into the bugs backlog 馃憤

Ping @lin-d-hop and @luisramos0 FYI

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Matt-Yorkley picture Matt-Yorkley  路  3Comments

kirstenalarsen picture kirstenalarsen  路  3Comments

sauloperez picture sauloperez  路  3Comments

myriamboure picture myriamboure  路  3Comments

shen-sat picture shen-sat  路  3Comments