How to add the new 0.71 cart feature

leehughesleehughes Member
in Help edited October 2010
Hi,

I'm trying to figure out the best way to add the new cart feature into my checkout page. Is it via a placeholder? Does it need php?

Thanks
Comments
  • lukeluke FoxyCart Team
    Hello leehugues. Which new cart feature are you referring to? If you mean product images, just send two new attributes to the cart add: "image" and "url".

    We'll add some documentation to that affect soon.
  • Hi,

    Yes the product image.

    I don't understand what you mean though by send the two new attributes to the cart..

    Sorry but you might have to spell it out to me ;)
  • lukeluke FoxyCart Team
    edited October 2010
    No problem Lee, sorry for being confusing. I was referencing these product attributes: http://wiki.foxycart.com/v/0.7.0/getting_started/adding_links_and_forms

    If you're doing a form, you would add something like this:
    <input type="hidden" name="image" value="http://www.myspacefx.net/import/graphics/Funny_Graphics_and_Pics/lol-cats_dune-cat.jpg"; />
    <input type="hidden" name="url" value="http://www.foxycart.com"; />
    
    If you're doing your add to cart items and links, you'd add this:
    &amp;image=http%3a%2f%2fwww.myspacefx.net%2fimport%2fgraphics%2fFunny_Graphics_and_Pics%2flol-cats_dune-cat.jpg&url=http%3a%2f%2fwww.foxycart.com
    
    The reason that second one looks funny is that it's been url encoded.
    The "image" references the url to the product image. If it's stored on your web server you can just include a path relative to the root of your site like /images/my_cool_product_image.jpg
    The "url" references the url of the product on your website so if someone clicks the image in the cart it will send them to the right product. That url can also be relative to your site root.

    Hope that helps. Please let us know if you have any questions and sorry the documentation isn't up yet.
  • thanks Luke I will have a play.
Sign In or Register to comment.