Jump to content

Has Anyone Got the Print Order Form Working?


Guest markyvuk

Recommended Posts

Guest markyvuk

Despite now trying a re-install and putting a bug report in I have had no joy in getting the Print Order Form gateway to function correctly. It seems to operate 'sometimes' but the fault is unrepeatable.

I always receive an email saying that the order has been placed. The problem seems to be that the form is not displayed to the customer for printing (quite a big problem!) and then the cart immediately goes from Step5 of the checkout process back to Step2 and the cart empties and the customer is logged out.

If anyone has got this working then please let me know as I think I am going mad.

I have developed a number of cart systems over the years and this one is great, but this error is driving me nuts. I will license the product too as I believe in supporting the developers but only when the cart is working at >90% accuracy.

If you want to try my cart click HERE Orders will not be processed at the moment - obviously!!

If you get the print order form to work please let me know!!

Link to comment
Share on other sites

Guest markyvuk

Hi Roban

Thanks, but this bug has already been dealt with in 3.0.2.

There is nothing wrong with the totals in the form. The problem is that the form fails to display, the customer's cart is emptied and the customer is logged out automatically!

Cheers

Link to comment
Share on other sites

WOO-HOO!!! I am so excited to hear that I am not the only one with this problem...exactly the same thing (although I am still on version 3.0.) Now, if we could just fix it, I would be in business!

While investigating why it would go to back to step 2, I found this code in orderForm.php:

$result = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($basket['cart_order_id']));

if($result == FALSE){

header("Location: ".$glob['rootRel']."cart.php?cart.php&act=step2");

I don't really know what the first part means, but the last line sends it back to step 2 if $result is false. If we can figure out the first part, we will have a better idea what the problem is. I'm guessing it is a problem with the database (???) but really am just guessing. Anyone know?

Thanks,

Jenny

Link to comment
Share on other sites

Guest markyvuk

jbeyler... I think you could be right here.

I am going to do some tests to see if I can overcome the error.

However, if any of you coders out there have any ideas what the problem could be please do not hesitate to shout up!

Are we the only two with this problem?

Mark

Link to comment
Share on other sites

Guest markyvuk

This code (orderForm.php) definately seems to be causing the problem:

$result = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($basket['cart_order_id']));

if($result == FALSE){

header("Location: ".$glob['rootRel']."cart.php?cart.php&act=step2");

If you remove the 'if' lines then the print order form works every time!

Anyone know why and what other problems this could cause?

Link to comment
Share on other sites

Hi,

I have used the print order form without any major glitches. The only problem I am facing is that it does not add the product price & the postage together. Apart from that all is working fine. Have a browse through www.itelall.com/store

I created an account wit your store to see the print order form (cart test)

Cheers

Link to comment
Share on other sites

Hmmm...I tried that (removing the "if" line) but then I get mySQL syntax errors for the line that comes next.

same here, I've tried to remove the "if", I've got this error "Parse error: parse error, unexpected '{' in /home/wktang/public_html/cart/modules/gateway/Print_Order_Form/orderForm.php on line 66",

I also PM to brooky, and he has no idea about this problem. BTW, it seems not happen to everyone. I was thinking about the version of php and mysql and gd, but all seems match the requirement.

Link to comment
Share on other sites

Guest markyvuk

Well I have removed the following from orderForm.php:

Line 67 header("Location: ".$glob['rootRel']."cart.php?cart.php&act=step2");

leaving the if statement empty, and everything seems to function okay.

As I said before I am not entirely sure what else this 'breaks' in cubecart but it certainly solves 99% of my problem.

The offending code seems to be:

$result = $db->select("SELECT * FROM ".$glob['dbprefix']."CubeCart_order_sum INNER JOIN ".$glob['dbprefix']."CubeCart_customer ON ".$glob['dbprefix']."CubeCart_order_sum.customer_id = ".$glob['dbprefix']."CubeCart_customer.customer_id WHERE ".$glob['dbprefix']."CubeCart_order_sum.cart_order_id = ".$db->mySQLSafe($basket['cart_order_id']));

if($result == FALSE){ <<the code above>> }

It would be nice for someone to tell me what this piece of code does so that I could try and identify why the problem occurs. I know I am not unique as having this problem.

Link to comment
Share on other sites

  • 2 weeks later...

Just an update about this issue. Since I re-created the database & user, delete all cc3 files and upload everything again. then did a clean installation with the install.php, it all works perfectly so far. Try again everyone, don't give up!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...