Adding Product URL Segment in Basket Response

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!
User avatar
PaoloLegaspi
Posts: 35
Joined: 07 Nov 2024, 15:02

Adding Product URL Segment in Basket Response

Post by PaoloLegaspi » 03 Jan 2025, 09:27

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!

Code: Select all

Aimeos version: Aimeos Headless 2024.10.*
PHP version: 8.2
Environment: Mac

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

Re: Adding Product URL Segment in Basket Response

Post by aimeos » 06 Jan 2025, 13:40

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, Image give us a star

Post Reply