solved How To Use Custom Button For FoxyCart?

alt=
Ekwe
@ekwe
10 years ago
212 posts
Trying to link a div to the foxycart popup cart. I see

{jrCore_module_function function="jrFoxyCart_add_to_cart" module="jrAudio" field="audio_file" item=$item}

But I am trying to do something like this

updated by @ekwe: 10/25/14 12:39:50PM
brian
@brian
10 years ago
10,148 posts
You can pass in your own image - i.e.

image="custom_button.png"

Just make sure it is in the active skin "img" directory.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
I knoow, but I don't want to use a button. I want to use a css designed button
brian
@brian
10 years ago
10,148 posts
Then use:

icon="css icon name"

instead...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
I want it to be next, Like Buy Now no icon, no image
brian
@brian
10 years ago
10,148 posts
Ekwe:
I want it to be next, Like Buy Now no icon, no image

Then just hard code the HTML as you want it.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
that's what I want to do.

Example:
updated by @ekwe: 09/19/14 11:49:02AM
brian
@brian
10 years ago
10,148 posts
You would have to just get the URL - i.e.

{jrFoxyCart_add_url module="jrAudio" item=$_item field="audio_file" assign="cart_url"}

<a href="{$cart_url}">Click here to add this item to the cart</a>

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
Thank you sir, implementing
alt=
Ekwe
@ekwe
10 years ago
212 posts
brian:
You would have to just get the URL - i.e.

{jrFoxyCart_add_url module="jrAudio" item=$_item field="audio_file" assign="cart_url"}

<a href="{$cart_url}">Click here to add this item to the cart</a>

Hope this helps!

Ok, getting this error. And it's not working - jrFoxyCart_add_url: item info array required
brian
@brian
10 years ago
10,148 posts
Yeah - you need to pass in the item array. So for example, if you are using this in the jrAudio/templates/item_list.tpl, it would go inside the "foreach" loop:

{foreach $_items as $item}
    {jrFoxyCart_add_url module="jrAudio" item=$item field="audio_file" assign="cart_url"}

    <a href="{$cart_url}">Click here to add this item to the cart</a>
{/foreach}

Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
brian:
Yeah - you need to pass in the item array. So for example, if you are using this in the jrAudio/templates/item_list.tpl, it would go inside the "foreach" loop:

{foreach $_items as $item}
    {jrFoxyCart_add_url module="jrAudio" item=$item field="audio_file" assign="cart_url"}

    <a href="{$cart_url}">Click here to add this item to the cart</a>
{/foreach}

Let me know if that helps.

Ah makes sense, let me try this
alt=
Ekwe
@ekwe
10 years ago
212 posts
Got it, thanks thanks. :) Although when I add to cart the popup brings up an error, saying "downloadable product needs to be configured or so"

Thanks again
brian
@brian
10 years ago
10,148 posts
Ekwe:
Got it, thanks thanks. :) Although when I add to cart the popup brings up an error, saying "downloadable product needs to be configured or so"

Thanks again

I've never seen that, but that is configured in your FoxyCart admin (not Jamroom).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
Ekwe
@ekwe
10 years ago
212 posts
Thanks

Tags