cancel
Showing results for 
Search instead for 
Did you mean: 

How to add calculate field to Product repository

SOLVED

How to add calculate field to Product repository

I would like to add new field call discount that calculate from product's price - product's special price and make it able to filter by search criteria.

 

I think I should use Extension Attributes but I not sure how to implement it.

 

Can anyone help suggest?

2 REPLIES

Re: How to add calculate field to Product repository

Hi @jirawat_pattanayutanachot,

 

Isn't possible for you to use a custom attribute with a custom backend model to get the price difference?

--
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution"

Re: How to add calculate field to Product repository

Hi @Damian Culotta,

 

I have done by collection already. it's working well for me. Thank you.