New fields add into price of product

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

New fields add into price of product

Post by traiyani75 » 05 Jun 2020, 10:50

Hello,

We want to add custom field into items like commission, internal delivery cost. Which we dont want to return into aimeos API request. How do we manage it & create new fields?

Thanks

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: New fields add into price of product

Post by aimeos » 06 Jun 2020, 10:23

If you extend the item, don't include that values in the toArray() method or only if the $private flag is passed.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

traiyani75
Advanced
Posts: 114
Joined: 08 Nov 2019, 11:56

Re: New fields add into price of product

Post by traiyani75 » 08 Jun 2020, 04:37

Can you please explain in details? We need to add extra fields for internal purpose. We dont need them to return into api response too.

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: New fields add into price of product

Post by aimeos » 09 Jun 2020, 10:03

Then, simply don't add those fields to the toArray() method of your extended item. Thus, they won't show up in the API.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply