Product URL in mini basket
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!
Product URL in mini basket
Hi,
how can we add the product url in mini basket?
As the url is not part of basket object I addedparameter, in aimeos.js:
but it is not working
Thank you!
how can we add the product url in mini basket?
As the url is not part of basket object I added
Code: Select all
data: {'include': 'product'},
Code: Select all
fetch(jsonurl, {
method: "OPTIONS",
headers: {'Content-Type': 'application/json'}
}).then(response => {
return response.json();
}).then(options => {
fetch(options.meta.resources['basket'], {
//added to get the product object with product-url / href
data: {'include': 'product'},
headers: {'Content-Type': 'application/json'}
}).then(response => {
return response.json();
}).then(basket => {
AimeosBasketMini.updateBasket(basket);
});
});
Thank you!
Re: Product URL in mini basket
You have to add the URL in the template:
https://github.com/aimeos/ai-client-htm ... #L138-L159
https://github.com/aimeos/ai-client-htm ... #L138-L159
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
Re: Product URL in mini basket
ok, now URLs are displayed,
but after adding another product to cart - without reloading the page - all product links are gone
I think .js (aimeos.js, basket-mini.js) has to be edited so that the url gets added to the prototype-item. But I can't find the product url in js.
but after adding another product to cart - without reloading the page - all product links are gone
I think .js (aimeos.js, basket-mini.js) has to be edited so that the url gets added to the prototype-item. But I can't find the product url in js.
Re: Product URL in mini basket
The mini basket is also updated here using the JSON API but it's not possible to get the generated product URLs from there:
https://github.com/aimeos/ai-client-htm ... .js#L9-L71
https://github.com/aimeos/ai-client-htm ... .js#L9-L71
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