Solidus: Master Price field should be conditionally required based on Spree::Config[:require_master_price]

Created on 22 Nov 2016  路  4Comments  路  Source: solidusio/solidus

Spree::Config exposes a preference, require_master_price, that when set to false, allows saving a master variant without a price.

If require_master_price is set to false, the "Master Price" field on Product#edit should not be required.

Here's the offending line: https://github.com/solidusio/solidus/blob/master/backend/app/views/spree/admin/products/_form.html.erb#L35

Beginner-Friendly Bug SolidusConf Hack Day

All 4 comments

on it :)

@mbreedlove We tried removing the required field, but it introduced further wrong behaviour. It would take the empty string assigned to price= and consider that a new price of 0.

I haven't run a store with this value set, what is the desired behaviour?

Couldn't recreate this bug in 2.7.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cdrage picture cdrage  路  3Comments

spaghetticode picture spaghetticode  路  3Comments

iqre8 picture iqre8  路  4Comments

aitbw picture aitbw  路  4Comments

graygilmore picture graygilmore  路  5Comments