realbig / theme_pmwoodwinds

1 stars 0 forks source link

Change default item for 'Finish' to [Choose one] in product single template #43

Closed BigActual closed 5 years ago

BigActual commented 5 years ago

The finish selector is defaulting to a finish instead of asking the end user to choose one.

d4mation commented 5 years ago

This is intentional. Otherwise things like Price and MSRP would not show properly.

BigActual commented 5 years ago

Did you modify this to work this way or is this how it comes from Woo?

d4mation commented 5 years ago

This was necessary to get MSRP to show, and change, properly on Variable Products. Since MSRP is a separate field from the included Price field, we had to do some stuff to make it work properly.

We could possibly make some changes so that it would instead show a N/A message or something until they select a variation, but then it wouldn't mesh well with how WooCommerce works. In WooCommerce, you're able to set a default Variation. On page load, we should respect that (which is what it does now).

image

BigActual commented 5 years ago

Are we approaching the MSRP incorrectly, then, because of the previous MSRP requests? If we need to have 'choose a finish' show then what happens to MSRP?

d4mation commented 5 years ago

I pushed a change to support this. If a default Variation is set, it will still work as it does now. However, if one is not set, then it will show the lowest price MSRP by default and then change to the correct MSRP as a Variation is chosen. This works the same way as Price does if a default Variation is not set.

BigActual commented 5 years ago

That's smart. Thanks.

BigActual commented 5 years ago

Just saying it back for confirmation.

BigActual commented 5 years ago

Victoria Dolfin replied EDIT: REDACTED EMAIL

4 mins ago Active The only reason I had put up default variables is because Eric informed me the MSRP would not show up otherwise. We would like this done to each and every new item with variables (instruments, mouthpieces, accessories). In this case, what do I need to do?


Can we fix this with a script?

d4mation commented 5 years ago

By "new", do they mean newly created, or "New" Product?

If newly created, this will work going forward for all Variable Products that are created without a default set.

If "New" Product, I'll have to write a script to reset the value for all previously created Products.

BigActual commented 5 years ago

Confirmed with the client that she means 'new' as in all items that are not used. Would you please move forward with the script you mentioned above?

d4mation commented 5 years ago

Just ran the code on Live to address this.

BigActual commented 5 years ago

Would you please ask Victoria to verify that it looks good on her end?