Share via E-Mail
Share on Google Buzz
Share on Twitter
Share on Facebook
E-junkie Blog
E-junkie FaceBook Page
E-junkie @ Twitter

E-junkie Ecommerce Forums » E-junkie Discussions

Tag Cloud for this topic:

multiAdd works in some circumstances, not others



Harry
member
Posts: 19


I'm soooooooooo close.

I'm trying to use the multiAdd function, in a form, to add a "rush processing" fee to an order. The idea is that a customer can configure a product and specify rush processing. Then when they click "Add to Cart," the product is added along with an additional charge.


Overview of the process:
User fills out a form.
When any field changes, I read all of the forms values and prepare an action string
I put the action string into the form's action value


Here's the summary:

testpage 1: testpage 2: add a
Browser form action form action single product
is hard coded set by script to the cart
======================================
Chrome 3.0 success! fail success
Safari 4 success! fail success
Firefox 3.5 fail fail success
IE8.0 fail fail success


Here's the hard-coded string that works in two browsers. The first product has options, the second -- the rush processing fee -- does not:

<form id="orderform" name="orderform" style="margin:0;padding:0;" action="javascript:EJEJC_multiAdd(Array('https://www.e-junkie.com/ecom/gb.php?c=cart&i=111111&cl=99999&ejc=2& o1=regular&&on0=design&os0=Adam&on1=cel&os1=Harry&on2=colors&os2=red and blue&quantity=76','https://www.e-junkie.com/ecom/gb.php?c=cart&i=222222&cl=99999&ejc=2'));" target="ej_ejc" method="POST" accept-charset="UTF-8">

My dynamically prepared string looks identical to the hard-coded string (at least in alert statements and Firefox's debugger). Also, I've combed thru the variables multiple times to make sure they're straight.

I deeply appreciate any help or insights


#
POSTED ON: December 24, 2009 @ 21:16 GMT -7




Harry
member
Posts: 19


this is more clear, I hope:

Harry
Here's the summary:

Chrome3; hard-coded string SUCCESS; dynamic string FAIL
Safari4; hard-coded string SUCCESS; dynamic string FAIL
Firefox3.5: hard-coded string FAIL; dynamic string FAIL
IE8.0: hard-coded string FAIL; dynamic string FAIL


adding a single product is always successful


#
POSTED ON: December 24, 2009 @ 21:26 GMT -7
MODIFIED ON: December 24, 2009 @ 21:27 GMT -7




Harry
member
Posts: 19


I'm in over my head. While it works OK in Chrome (now), it fails in Firefox, IE and Safari. The problem seems related to the way I'm calling e-junkie functions.

What resources are available?

Harry


#
POSTED ON: December 26, 2009 @ 08:45 GMT -7




E-junkieNinja
E-Junkie Crew
Posts: 636


Can you send us the URL of your live web page that you are testing the multi-add button on?


#
POSTED ON: December 29, 2009 @ 17:03 GMT -7




Harry
member
Posts: 19


Here is the current test page: www.CandyTorahs.com/ginormous/text-three.php

It works in Chrome, but not in Firefox.


#
POSTED ON: December 29, 2009 @ 17:11 GMT -7
MODIFIED ON: January 3, 2010 @ 11:52 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 3486


Apologies for this delayed reply, but the test page URL you provided appears to be defunct now? Taking a look at the sample code you provided above:

<form id="orderform" name="orderform" style="margin:0;padding:0;" action="javascript:EJEJC_multiAdd(Array('https://www.e-junkie.com/ecom/gb.php?c=cart&i=111111&cl=99999&ejc=2& o1=regular&&on0=design&os0=Adam&on1=cel&os1=Harry&on2=colors&os2=red and blue&quantity=76','https://www.e-junkie.com/ecom/gb.php?c=cart&i=222222&cl=99999&ejc=2'));" target="ej_ejc" method="POST" accept-charset="UTF-8">

I noticed a couple things that may be relevant to the problem you were having. First, you've got a double & where there should be only one -- i.e., 'o1=regular&&on0=design' should be 'o1=regular&on0=design'. Second, there may be a problem using spaces in option values within a URL -- i.e., 'os2=red and blue' should be either 'os2=red+and+blue' or if that doesn't work, 'os2=red%20and%20blue' (%20 is the proper URL-encoding for an ASCII [space] character, but using + for a [space] should work as well).


#
POSTED ON: January 14, 2010 @ 14:51 GMT -7




Harry
member
Posts: 19


Thank you for looking at this. I really appreciate it!

I reposted it here: candytorahs.com/ej/test-three.php. Some of the image links are broken - just ignore them. The problem is still demonstrated.

In Chrome, I can choose a rush fee and it's added correctly. Regarding the double-ampersand, it's gone now. And the "red and blue" text (os2) is optional. Whether it's a string with spaces or just a null value has no effect on the problem.

Thanks


#
POSTED ON: January 14, 2010 @ 21:35 GMT -7




E-junkieGuru
E-Junkie Crew
Posts: 3486


We'll need to ask Development to look into this, as it's a bit beyond Support's familiarity with how our software is programmed.


#
POSTED ON: January 28, 2010 @ 20:51 GMT -7


You must be logged in to make a post. Please click here to login.

30 Day Money Back Guarantee
PayPal Certified Integration
Google Checkout Certified Integration
Slam the Online Scam