Tag Cloud for this topic:
|
Empty Cart URL & Set quantity on add
|
Outshine
member
Posts: 11
|
Hello,
Two quick questions:
1) Is there a way to empty the cart before adding any new items? We have a 7-step configuration process that adds multiple items from a single "Add to Cart" button, but if they close the cart and re-configure it's keeping all of the old configuration products, as well.
2) I'm trying to set the quantity of an item when it is added to the cart. I searched the forums and found an answer from Tyson that said to put &quantity=5 at the end of the string. It's adding the product, but it's setting the quantity to 1. This is my URL:
https://www.e-junkie.com/ecom/gb.php?c=cart&i=206882&cl=48651&ejc=2&
quantity=5
Also odd is that I have that item set to allow the user to change quantity, but when it adds to the cart the quantity can't be updated.
Thanks for any info!
# POSTED ON: February 10, 2009 @ 16:07 GMT -7 MODIFIED ON: February 10, 2009 @ 16:51 GMT -7
|
Outshine
member
Posts: 11
|
Tyson, do you have any thoughts? Should I submit a support request, or is it okay just through the forum?
# POSTED ON: February 11, 2009 @ 14:22 GMT -7 MODIFIED ON: February 11, 2009 @ 14:22 GMT -7
|
Tyson
E-Junkie Crew
Posts: 1486
|
Taking the quantity issue first, that could happen if you don't have enough stock for the product for anyone to order 5 of that product. E.g., if you're sending stored codes and currently have only one code in your list, or if you're using Inventory Control and have your stock set to 1, then specifying any larger quantity would Add to Cart only the lesser quantity you actually do have in stock (1 in this case).
We track each buyer's cart contents by setting a cookie in their browser that expires in 24 hours, so anything added to a cart should persist in that buyer's cart for that long. I don't know of any way to force a new cookie to be set every time an Add to Cart is pressed (effectively abandoning the cart's previous contents), since that defeats the usual purpose of a cart, where every item added to it gets retained until checkout or 24 hours have transpired. In fact, we usually regard a cart that doesn't retain its contents as a glitch to avoid and prevent! I will assign this to our Lead Developer's attention to see if he can think of anything that could accomplish what you describe.
You can at least remove the Continue Shopping button by adding the following lines to your View Cart button code, just before the "// -->" line in the standard code we provide:
function EJEJC_config() {
EJEJC_POSTCALL=true;
}
function EJEJC_shown() {
jQuery("#btnContShop").remove();
}
# POSTED ON: February 12, 2009 @ 13:41 GMT -7
|
Outshine
member
Posts: 11
|
Hi Tyson,
As always, thank you for taking the time to provide your expertise.
Regarding the quantity issue, I took a look at that product in the seller admin and I'm showing the only product requirements I have checked are "Let buyers edit quantity in cart" and "Shipping/Buyer's Address". I don't have "Inventory Control" checked. Is there something else in the configuration I need to change?
Regarding the cart issue, would it be possible to clear that cookie each time "Add to Cart" is pressed, then immediately add the new items to cart? Since it's a Flash button, I can easily run several Javascript functions on a single click. I have some experience with cookies, so if you could provide the cookie name I may be able to work out a Javascript function that will clear it (or better yet, if your developer could provide the code to clear the cookie.)
Thanks again!
Luke
# POSTED ON: February 12, 2009 @ 14:00 GMT -7
|
Outshine
member
Posts: 11
|
Please advise ASAP. Waiting on these final issues to launch the site.
# POSTED ON: February 17, 2009 @ 16:07 GMT -7
|
Tyson
E-Junkie Crew
Posts: 1486
|
The quantity issue is because your product is priced at 0.00. To prevent abuse, our cart will only allow one of any zero-priced product to be added to a cart. If you change the item price to something greater than 0.00 in Seller Admin, the &quantity= parameter will work.
As for forcing the cart cookie to reset, or deliberately causing the cart to "forget" its contents between views, I have assigned the matter to our Lead Developer's attention, as that would be up to him to consider and offer a solution, if indeed one is possible at all. You might be able to figure something out on your own by examining the cookies our cart sets in your browser. Since our standard browser overlay works "inside" your page, cart-related cookies would be set as a first-party cookie with your site's own domain. I think ej_ejc_cart_idXXXXX is the main cart-tracker cookie (where XXXXX is your client ID, apparently 48651 in your case, looking at your sample URL above), and it appears that deleting that cookie in the buyer's browser should clear their cart contents.
# POSTED ON: February 17, 2009 @ 18:15 GMT -7
|
Outshine
member
Posts: 11
|
Great, thanks for the information!
# POSTED ON: February 17, 2009 @ 18:18 GMT -7
|
|