Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

quantity change


carlf

Recommended Posts

Customer tried to purchase 48 of an item. At checkout quantity changed to 1. I was able to duplicate customer complaint.

 

I tried quantity purchases of 4-5 other items and all changed to 1.

 

Site is using osCommerce 2.2-MS2, and payment is PayPall.

 

Customer I set up the site for is not very happy :(

Link to comment
Share on other sites

post a link to the site, perhaps something you did in programming did that, on either the product_info.php, etc.

did you remove the qty box from one of the pages?

what is stock level set at?

Link to comment
Share on other sites

I checked quantity levels and all are in the hundreds. Tried purchases of 5-10 and all jumped to 1 at final checkout.

 

I can not find any quantity boxes that I deleted in setup...

 

I am stumped.

Link to comment
Share on other sites

Greetings all,

 

I have not yet resolved this issue and am resorting to begging.

 

I set this site up for a customer. Everything is working except:

 

When a customer makes a purchase of more that a quantity of one of an item, at checkout the quantity changes to one.

 

I have checked this with many items (products) on the site, and it happens with all.

 

I checked the quantity on hand, and this is not an issue. Many of the items have hundreds in stock, but a purchase of 5 changes to one.

 

Please, if you can think of anything that may resolve this issue, please let me know.

 

Carl

>_<

Link to comment
Share on other sites

Hi Carl,

I checked out the site, but I can't seem to reproduce the problem. When I went to checkout, all of the selected quantity was still in the cart. (I didn't go all the way to the confirm screen, because I didn't want to leave you a bogus order)

 

Could you detail the exact steps that you are going through that produces this error?

Link to comment
Share on other sites

Hi Carl,

I checked out the site, but I can't seem to reproduce the problem. When I went to checkout, all of the selected quantity was still in the cart. (I didn't go all the way to the confirm screen, because I didn't want to leave you a bogus order)

 

Could you detail the exact steps that you are going through that produces this error?

Greetings,

 

I just figured it out It appears that both the customer and myself were entering the quantity and hitting checkout. By enterint the quantity and hitting enter, then checkout , the issue is resolved.

Link to comment
Share on other sites

Greetings,

 

I just figured it out  It appears that both the customer and myself were entering the quantity and hitting checkout.  By enterint the quantity and hitting enter, then checkout , the issue is resolved.

 

Oh right, do you mean you didnt hit the "update" button

Link to comment
Share on other sites

I think that's probably exactly what he meant....

 

You know this raises an interesting issue: Carl, his client, and the customer were all new to the cart and it wasn't intuitive for any of them to click "Update" before clicking "Checkout" to change the quantity. Makes sense... you should be able to just change the quantity and then go straight to checkout(with update done automatically). I have to wonder how many sales are being lost because of this confusion in the way Oscommerce works by default. :blink:

Link to comment
Share on other sites

I think that's probably exactly what he meant....

 

You know this raises an interesting issue: Carl, his client, and the customer were all new to the cart and it wasn't intuitive for any of them to click "Update" before clicking "Checkout" to change the quantity. Makes sense... you should be able to just change the quantity and then go straight to checkout(with update done automatically). I have to wonder how many sales are being lost because of this confusion in the way Oscommerce works by default.  :blink:

 

 

well that can be easily achieved (and yes I know it will not work for all ... but at least a bunch!)

 

go to shopping_cart.php and find where the quantity can be changed

 

replace those 3 lines of code by this:

 

      $info_box_contents[$cur_row][] = array('align' => 'center',
                                            'params' => 'class="productListing-data" valign="middle"',
                                            'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="1" maxlength="1" onchange="this.form.submit()"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Link to comment
Share on other sites

I've taken a look at the code, but can't seem to come up with any easy way to make the modification in PHP.(At least not with my limited PHP coding skills)

 

Thanks for the javascript mod, Monika! While it won't work for browsers without java(as you mentioned), it is an excellent stop-gap measure.

 

BTW: Here's Monika's mod stripped down to the basics. Should make it easier to add to a stock Oscommerce install:

 

Find this around line 145 of shopping_cart.php:

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

 

And REPLACE it with this:

'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4" onchange="this.form.submit()"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

Link to comment
Share on other sites

  • 3 weeks later...

i have try your code, but it doesn't work all time

the table CUSTOMERS_BASKET is update but not (not always) the shopping cart

 

i have try a variation with a declare function

 

<script type="text/javascript" language="JavaScript"><!--
function DoSubmission() {
document.cart_quantity.submit();
}
//--></script>

 

and then

 

'text' => tep_draw_input_field('cart_quantity[]', $credits[$i]['quantity'], 'size="1" maxlength="2" onchange="DoSubmission()"') . tep_draw_hidden_field('credits_id[]', $credits[$i]['id']));

 

without success ....

have you an idea to improve the code ?

 

 

 

 

 

well that can be easily achieved (and yes I know it will not work for all ... but at least a bunch!)

 

go to shopping_cart.php and find where the quantity can be changed

 

replace those 3 lines of code by this:

 

 ? ? ?$info_box_contents[$cur_row][] = array('align' => 'center',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'params' => 'class="productListing-data" valign="middle"',
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="1" maxlength="1" onchange="this.form.submit()"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']));

Link to comment
Share on other sites

i have try your code, but it doesn't work all time

the table CUSTOMERS_BASKET is update but not (not always) the shopping cart

 

i have try a variation with a declare function

 

<script type="text/javascript" language="JavaScript"><!--
function DoSubmission() {
document.cart_quantity.submit();
}
//--></script>

 

and then

 

'text' => tep_draw_input_field('cart_quantity[]', $credits[$i]['quantity'], 'size="1" maxlength="2" onchange="DoSubmission()"') . tep_draw_hidden_field('credits_id[]', $credits[$i]['id']));

 

without success ....

have you an idea to improve the code ?

 

I have put an alternative for this in tips and tricks a while ago.

Treasurer MFC

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...