pakatemp Posted October 4, 2011 Share Posted October 4, 2011 I'm trying to create a link from an external website that will directly link to an "Add to cart" page in prestashop. However, all add to cart links internal to prestashop have a "&token=blahblahblah" in their url. Without the correct token, my external link does not work (will not add to cart, because no cart exists). I need a way to initializes the token/cart without first going to index.php (which is where it is normally created). How can this be accomplished? Do I need to XHR (ajax) index.php in the background? It seems like a reasonable thing I'm trying to do, but no simple way to execute without resorting to this. Link to comment Share on other sites More sharing options...
pakatemp Posted October 4, 2011 Author Share Posted October 4, 2011 Also, where is this token actually created? Cannot find it anywhere. What exactly is being tokenized? Is it the cart session, or something else? Appears it is not the cart session as adding to cart from 2 different browsers using the same token value does not disturb the values. Actually, the variable in question is: "static_token", but gets placed in to the URL as "token". Link to comment Share on other sites More sharing options...
pakatemp Posted October 13, 2011 Author Share Posted October 13, 2011 Developers: Please help! I need to understand the token. Link to comment Share on other sites More sharing options...
jmdesarrollo Posted May 2, 2012 Share Posted May 2, 2012 Same problem here Link to comment Share on other sites More sharing options...
Dh42 Posted May 2, 2012 Share Posted May 2, 2012 If you are just going for one product try this. Copy the link to the add to cart and use that. edit: oops that only works if the page is reloaded. Link to comment Share on other sites More sharing options...
ingrossoerisparmio Posted February 3, 2016 Share Posted February 3, 2016 (edited) someone know the solution? how to call admin url prestashop (whit token) by third part application? thanks Edited February 3, 2016 by ingrossoerisparmio (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now