Products relationship
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Products relationship
I have created two product types "bike" and "bike_part", and I have linked them together using the "Suggested products".
For example a bike can have many bike parts and a bike part can belong to many bikes.
Is there a way that I can add a "quantity" field to the relationship ?
For example a bike can have 2 of the same part but others have only 1.
Also I have another question concerning images. Is there a way that I can have different media groups/types connected to 1 product ( in this case bike ) ?
For example for a bike, I want to add images displaying the bike in one group and other images displaying specification sheet images in another group.
For example a bike can have many bike parts and a bike part can belong to many bikes.
Is there a way that I can add a "quantity" field to the relationship ?
For example a bike can have 2 of the same part but others have only 1.
Also I have another question concerning images. Is there a way that I can have different media groups/types connected to 1 product ( in this case bike ) ?
For example for a bike, I want to add images displaying the bike in one group and other images displaying specification sheet images in another group.
Re: Products relationship
There's a "config" property in each relationship where you can add a "['quantity' => 2]" value. This would have no consequences as long as you don't use that value while rendering the suggested products using an adapted template. Also, you are not able to manage this value in the simple mode admin interface yet - the input fields still are missing. In expert mode, you can manage that value.techgeekh wrote: Is there a way that I can add a "quantity" field to the relationship ?
Yes, add a new media type, e.g. "sheets" and assign that type to your sheet images. In the frontend template, you can get the images by type with:techgeekh wrote: Also I have another question concerning images. Is there a way that I can have different media groups/types connected to 1 product ( in this case bike ) ?
For example for a bike, I want to add images displaying the bike in one group and other images displaying specification sheet images in another group.
Code: Select all
$product->getRefItems( 'media', 'sheets', 'default' )
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star