Does anybody have an idea on how we can pass variables to PayPal with this plugin?
I have everything working fine but I need a way for the user to be able to select a colour and hook that info into this plugin.
Any help much appreciated. 😊
Is it possible to add more than one item to the cart with one click? Perhaps by piping the entry id’s?
I have a screen that lists “Favorites” for the logged in user… and the client wants a button the user can click that adds all the Favorited items to the sample order.
Example add to cart link…
<a href="http://{path=cart/add}835|540">Add to Cart</a>
Below is example code to generate the link (Using Favorites module tags)
<a href="http://{path=orders/add}" class="cart">Add ALL to Order</a>
(NOTE: some code removed for the post so it would render)
You beat me to it here! 😉
Was just going to say that the cart wasn’t created with adding more than one item at a time but it does internally link them with commas so was just going to suggest trying that. Looks like you beat me to it though and you’ve found the hidden easter egg feature! 😊
Best wishes,
Mark
Looks like you beat me to it though and you’ve found the hidden easter egg feature! 😊
And a nice little hidden feature it is. Saved me loads of time trying to figure out how to code that feature.
Thanks for the reply, Mark. And great plugin by the way… I’ll be using it more now that I have experience with it.
Hi Mark,
Looks like you beat me to it though and you’ve found the hidden easter egg feature! 😊And a nice little hidden feature it is. Saved me loads of time trying to figure out how to code that feature.
No problems. Probably would have just needed a foreach structure in there but as the plugin internally does that anyway it just concatenates the string into the existing cart variable doing that 😊
Actually looking back at the plugin I went from storing the IDs with commas between them to converting them in the plugin to have pipe | characters for when they need to be inserted into weblog tags. Not really too sure why I did that now as I could have just kept the whole thing as pipes. May re-code the plugin to do that at some point as I reckon it will probably make it a little smaller in code.
Thanks for the reply, Mark. And great plugin by the way… I’ll be using it more now that I have experience with it.
Thanks for the kind words. If you do need it on more sites then I can do deals on multiple purchases of the plugin. Just e-mail me directly and we’ll see what we can do.
Best wishes,
Mark
Mark, I just ran into another need that I’m not sure if the plugin helps with…
Is there a conditional I can use to check if an item is already added to cart? With this site I’m working on, I don’t want to allow the user to order more than one of each item so I want to show an “Already Added” type of message if an item is already in the cart.
Thanks Mark.
EDIT - Thinking about it I would probably just make another function for the plugin which you would then need to feed in the entry_id to and have a conditional in there instead. Will take a look at that when I get the chance.
Hi Mark,
Mark, I just ran into another need that I’m not sure if the plugin helps with… Is there a conditional I can use to check if an item is *already* added to cart? With this site I’m working on, I don’t want to allow the user to order more than one of each item so I want to show an “Already Added” type of message if an item is already in the cart. Thanks Mark.
There’s nothing built-in to the plugin that could do that out of the box so I’d have to add in a conditional to the plugin in order for it to do that. Will have to think on that one for a while.
EDIT - Thinking about it I would probably just make another function for the plugin which you would then need to feed in the entry_id to and have a conditional in there instead. Will take a look at that when I get the chance.
Thanks Mark… that’s great to hear. I figured it wouldn’t take a “Research Scientist” very long to figure that one out!
I suddenly just felt the need to buy you “a drink, or two”.
I suddenly just felt the need to buy you “a drink, or two”.
Mine’s a Coke as I don’t drink alcohol 😉
New function now added to the plugin called already_added :
{exp:shopping_cart_functions:already_added entry_id="{entry_id}" cart_name="shop"}
{if in_cart}
Sorry item can only be added once
{if:else}
<a href="http://{path=%27cart/add%27}{entry_id}" title="Add {title} to your cart">Add To Cart</a>
{/if}
{/exp:shopping_cart_functions:already_added}
This will need to go inside of your weblog tag to be able to pick up the entry_id or you will need to supply the entry_id directly.
File e-mailed along to you just now.
Hopefully that should do what you’re after. Let me know if it’s not right though and I’ll take another look for you.
Best wishes,
Mark
Many thanks, Mark. That added function really helped out on the project I’m working on. A “drink, or two” should be on it’s way via PayPal. 😉
Thanks to this and your SCM Item plugin, I can quite easily check if a product is available to order in the first place, then check to see if it has already been added to the order.
{exp:weblog:entries weblog="products"}
{exp:scm_item entry_id="{entry_id}"}
{if item_added == "TRUE"}
{exp:shopping_cart_functions:already_added entry_id="{entry_id}" cart_name="order"}
{if in_cart}
Already Added to Order
{if:else}
<a href="/orders/add/{entry_id}">Add to Your Order</a>
{/if}
{/exp:shopping_cart_functions:already_added}
{if:else}
Not Available to Order
{/if}
{/exp:scm_item}
{/exp:weblog:entries}
(Trimmed down for readability)
Thanks again. I will definitely be purchasing your Shopping Cart plugin for future projects.
Hi Mark,
Many thanks, Mark. That added function really helped out on the project I’m working on. A “drink, or two” should be on it’s way via PayPal. 😉
Thank you so much for that. Very very kind of you indeed.
Thanks to this *and* your SCM Item plugin, I can quite easily check if a product is available to order in the first place, then check to see if it has already been added to the order.(Trimmed down for readability){exp:weblog:entries weblog="products"} {exp:scm_item entry_id="{entry_id}"} {if item_added == "TRUE"} {exp:shopping_cart_functions:already_added entry_id="{entry_id}" cart_name="order"} {if in_cart} Already Added to Order {if:else} <a href="/orders/add/{entry_id}">Add to Your Order</a> {/if} {/exp:shopping_cart_functions:already_added} {if:else} Not Available to Order {/if} {/exp:scm_item} {/exp:weblog:entries}
Excellent news! Glad that it has come in handy for you and thanks for sharing your solution there. All very helpful.
Thanks again. I will definitely be purchasing your Shopping Cart plugin for future projects.
That’s very kind thanks. Remember that if you ever need to purchase more than one at a time then I am definitely open to offers if you want to make multiple purchases at once.
Hope everything goes well for you.
Best wishes,
Mark
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.