Page 1 of 1

Get Prices of Attributes added by Supplier

Posted: 24 Jun 2022, 12:53
by kartikbhat
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 :)

Re: Get Prices of Attributes added by Supplier

Posted: 26 Jun 2022, 07:54
by aimeos
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();
	}
}