Add articles to cart by GET request
Posted: 30 Jun 2020, 11:30
Hello,
when an article is already in the cart, then I can e.g. update the quantity or deleting the article by starting a GET request.
When I check in the reference:
https://aimeos.org/docs/Developers/Html ... mes#Basket
it should be possible to provide b_attrvarid as a parameter, too.
But how do I provide the parameter containing the key for this?
I want to provide the params to the url function
https://aimeos.org/docs/Developers/Html ... helper#url
Like this:
When I check the resulting URL, this contains a syntax error, though:
https://.../cart?ai[action]=index&ai[b_action]=add&ai[p_prodid]=1189&ai[b_attrvarid[size]=1032&ai[controller]=Basket
The closing ] is missing for the b_attrvarid .
How can I use the b_attrvarid properly?
Claudia
when an article is already in the cart, then I can e.g. update the quantity or deleting the article by starting a GET request.
When I check in the reference:
https://aimeos.org/docs/Developers/Html ... mes#Basket
it should be possible to provide b_attrvarid as a parameter, too.
But how do I provide the parameter containing the key for this?
I want to provide the params to the url function
https://aimeos.org/docs/Developers/Html ... helper#url
Like this:
Code: Select all
$params = array(
'b_action' => 'add',
'b_prodid' => 1189,
'b_attrvarid[size]' => 1032
);
https://.../cart?ai[action]=index&ai[b_action]=add&ai[p_prodid]=1189&ai[b_attrvarid[size]=1032&ai[controller]=Basket
The closing ] is missing for the b_attrvarid .
How can I use the b_attrvarid properly?
Claudia