Add new properties to product in 2.80

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
10 年 前
I want to add another price to my products...a M2 (meter squared) price and a pack size (in M2).

Should this be done by updating the entity of the core or should a plugin be developed?

Ultimately if a product has a M2 price i want to display that price on the home page and the product detail page rather than the default price.

Is this easier to do in the newer version?

S
10 年 前
You could use GenericAttribute rather than adding a new property (and column in db Product table).
It could probably be done as a widget plugin.  E.g. you can see    @Html.Widget("productbox_add_info")  in \Presentation\Nop.Web\Views\Catalog\_ProductBox.cshtml  (this is in 3.20 - not sure if that widget is in 2.80)
10 年 前
thanks for the reply...would this method allow me to display the new price on the homepage and anywhere else the product is displayed?

S
10 年 前
Those other pages would also have to have that widget placeholder (or another one that you would also handle), or you would have to put a widget placeholder in the Views (.cshml files) where you needed them.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.