If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / Can I get rid of the number_of_uploads parameter on the shopping_cart URL?

Can I get rid of the number_of_uploads parameter on the shopping_cart URL?

Locked

Started by dreamdaily on 16 Mar 2010, 5:57 PM · Views: 1,171

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
16 Mar 2010, 5:57 PM
#1
dreamdaily avatar

dreamdaily

New Zenner

Join Date:
Apr 2005
Posts:
53
Plugin Contributions:
0

Post #1 by dreamdaily

Hello everyone!

I've noticed that

  • when I add a product (type: general) to the shopping cart and that product has no attributes of any kind defined, the URL of the shopping cart is a straightforward:
    http://www.store.com/shopping_cart

-however, if the product added to the shopping cart has any kind of attribute defined (not necessarily set, just defined), the URL of the shopping cart is this:
http://www.store.com/shopping_cart?number_of_uploads=0

File 'attributes.php' where this happens bears a comment that this functionality was added at a later point:
// iii 030813 added: support for file fields

So what?
The inconvenience of that comes with any web analytics that treats it a separate "page".
Worse: Conversion tracking (if adding product to a cart is a type of conversion you track) - requires two conversion pages set and treats it as two different conversions. (OK, I know how to work around this one...)
Much worse: split- or multivariate-testing sees these URLs as 2 separate pages and track only one or another. Messy.
Even messier when a product with attributes is removed from the cart and the shopping cart all of a sudden changes from "long" one (with the parameter) to the "short" one (without the parameter).

My Question:
What is the best way to disable it, if no upload is required for attributes, and make the shopping cart URL a simple: http://www.store.com/shopping_cart ?

Your input is appreciated!
Thank you in advance!

21 Mar 2010, 3:02 PM
#2
hica avatar

hica

New Zenner

Join Date:
Mar 2010
Posts:
6
Plugin Contributions:
0

Post #2 by hica

It seems you need to take some coding.
As far as I know, the number_of_uploads within URL is generated by includes\modules\attributes.php
If you use Zen Cart 1.3.8a, you may find at the end of the file:```
$_GET['number_of_uploads'] = $number_of_uploads;

if($number_of_uploads > 0) {
$_GET['number_of_uploads'] = $number_of_uploads;
...
}

25 Mar 2010, 5:04 AM
#3
dreamdaily avatar

dreamdaily

New Zenner

Join Date:
Apr 2005
Posts:
53
Plugin Contributions:
0

Post #3 by dreamdaily

Thank you very much!

You are likely correct.

Without testing it's unclear whether this little coding breaks anything or not.
This functionality was added at a later point with some purpose in mind... who knows, I'll post again if/after I implement this fix.

Thank you!