Get Prices of Attributes added by Supplier

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
kartikbhat
Posts: 20
Joined: 02 Dec 2021, 17:18

Get Prices of Attributes added by Supplier

Post by kartikbhat » 24 Jun 2022, 12:53

Product's each attribute has certain price variables defined by it 'Supplier/Vendor' (Site Admin);
Eg: delivery price based on location
  • $20 for 10km
  • $30 for 20km
these price variables remain same for all products of that 'supplier' (Site Admin)


[/attachment]


I need to fetch those all price ranges of that attribute using product id and attribute id on Catalog Detail Page

Help me to get id

TIA :)
Attachments
attributePriceVariables.png
attributePriceVariables.png (127.73 KiB) Viewed 90 times

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

Re: Get Prices of Attributes added by Supplier

Post by aimeos » 26 Jun 2022, 07:54

The attributes and their prices are already available in the catalog detail view and you can display them using:

Code: Select all

foreach( $this->detailProductItem->getRefItems( 'attribute', 'delivery' ) as $attrItem )
{
	foreach( $attrItem->getRefItems( 'price' ) as $priceItem ) {
		echo $priceItem->getValue();
	}
}
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply