Adding Product URL Segment in Basket Response
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
- PaoloLegaspi
- Posts: 35
- Joined: 07 Nov 2024, 15:02
Adding Product URL Segment in Basket Response
Hi there,
We’re currently working on our cart, specifically with basket product lists. Would it be possible to include just the basket product’s URL segment in the Basket Response JSON:API?
We need this because we’re using the product slug to redirect users back to the product details page. Would we need a basket/product decorator and a custom item Standard for it?
Thanks!
We’re currently working on our cart, specifically with basket product lists. Would it be possible to include just the basket product’s URL segment in the Basket Response JSON:API?
We need this because we’re using the product slug to redirect users back to the product details page. Would we need a basket/product decorator and a custom item Standard for it?
Thanks!
Code: Select all
Aimeos version: Aimeos Headless 2024.10.*
PHP version: 8.2
Environment: Mac
Re: Adding Product URL Segment in Basket Response
Unfortunately not. The basket is saved as serialized object in the DB and not in the mshop_order* tables where data can be added while retrieving them. The only option is to fetch the product data with the URL segment in a second request of the JSON:API.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
