Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Credit Card Type +Last 4 digits on HTML Invoice

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 07-30-2006, 05:55 PM
 
alru111 alru111 is offline
 

eXpert
  
Join Date: Dec 2005
Posts: 244
 

Default

Quote:
Originally Posted by moneysaver67
Quote:
Originally Posted by alru111
the error appears on the confirmation email to the seller.

more details on the error


Request URI : ../payment/payment_cc.php
SQL query : SELECT details FROM xcart_orders WHERE orderid =
Error code : 1064

You may have grabbed the previous version of the code. I noticed this error and updated my first post.

Please check that your code contains

Code:
if( empty( $orderid ) ) $orderid = $GLOBALS[secure_oid][0];

So it should look like this:

Code:
function func_order_details( $orderid ) { global $sql_tbl; // Grab the encrypted details if( empty( $orderid ) ) $orderid = $GLOBALS[secure_oid][0]; ...

I checked the code, it looks just like you advised but still the error
It appears in the 'Order initial notification' email sent to the merchant, not the customer copy though


Payment method:
Credit Card INVALID SQL: 0 :
SQL QUERY FAILURE: SELECT details FROM xcart_orders WHERE orderid =
: N/AxxN/A
__________________
X-Cart version 4.0.19
Reply With Quote
  #12  
Old 07-30-2006, 06:05 PM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

Quote:
Originally Posted by carpeperdiem
I'm going to Firefox right now... well WHADDA YOU KNOW! Wow, that's a great mod! Moneysaver, you now have 2 superb mods -- any others?

In fact, I have a great mod I just made for decreasing the load time of product pages. This mod is mainly good for products with MULTIPLE detailed images, which basically doesn't load any detailed images, even the first, until the product descriptions, etc are fully loaded. Then, only the first is loaded, and the rest are displayed only when the user chooses to advance to the next image in the list. The images queue using a preloader, and display proper image on success or "Image Could Not be Found" on an error.

I'll probably post this one soon. It's a quick/easy mod, too
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote
  #13  
Old 07-30-2006, 06:08 PM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

What ACTIVE payment methods do you offer?

What are their names, as defined in the admin section of x-cart?

In short, the error is that the SQL statement does not know the ORDER # of the last order, which is kind of odd. There is a check that sees if the order_id param sent is empty, to reference from GLOBALS, but still coming up blank. I could modify to error cleanly and simply display the original onError, but I'd like to see if we can't figure out what's going in your situation...
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote
  #14  
Old 07-30-2006, 06:09 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

Quote:
Originally Posted by moneysaver67
What ACTIVE payment methods do you offer?

What are their names, as defined in the admin section of x-cart?
- Credit Card
- Gift Certificate

I have not enabled the gateway yet, still only testing (manual processing mode).

I had to pull the mod for now.

Could this still be a whitespace issue (not just safari, but all macintosh handling of text) ?

I've learned the hard way that php is sensitive to whitespace... I use the gold-standard of text editors for the mac - Text Wrangler - textwrangler has unix and dos and mac and unicode modes (and of course, I'm in unix mode)

Any ideas? Thanks!
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #15  
Old 07-30-2006, 06:20 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

Quote:
Originally Posted by moneysaver67
In fact, I have a great mod I just made for increasing the load time of product pages.
Surely, you mean increasing load SPEED (or conversely, REDUCING load time - yes?

At first I thought you were joking, until I kept reading...
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #16  
Old 07-30-2006, 06:42 PM
 
alru111 alru111 is offline
 

eXpert
  
Join Date: Dec 2005
Posts: 244
 

Default

Quote:
Originally Posted by moneysaver67
Quote:
Originally Posted by carpeperdiem
I'm going to Firefox right now... well WHADDA YOU KNOW! Wow, that's a great mod! Moneysaver, you now have 2 superb mods -- any others?

In fact, I have a great mod I just made for increasing the load time of product pages. This mod is mainly good for products with MULTIPLE detailed images, which basically doesn't load any detailed images, even the first, until the product descriptions, etc are fully loaded. Then, only the first is loaded, and the rest are displayed only when the user chooses to advance to the next image in the list. The images queue using a preloader, and display proper image on success or "Image Could Not be Found" on an error.

I'll probably post this one soon. It's a quick/easy mod, too

That one I could use too
I used a custom template for my store and the way I placed the tables when loading it first shows side boxes, they are kind of collapsed into the middle. It makes the whole site look distorted esp on slow connections.
__________________
X-Cart version 4.0.19
Reply With Quote
  #17  
Old 07-31-2006, 08:28 AM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

Quote:
Originally Posted by carpeperdiem
Quote:
Originally Posted by moneysaver67
In fact, I have a great mod I just made for increasing the load time of product pages.
Surely, you mean increasing load SPEED (or conversely, REDUCING load time - yes?

At first I thought you were joking, until I kept reading...

OK OK..you caught me. ( I've editted the post )
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote
  #18  
Old 07-31-2006, 01:17 PM
 
ecommerce ecommerce is offline
 

eXpert
  
Join Date: Jul 2006
Posts: 267
 

Default

carpe, does the payment options determine if this works or not?


I will like to have paypal API, but it should just read credit card.
(paypal should be invisible)

fax order

phone order

money order

gift certificate

will it work with those options?
__________________
X-Cart 4.0.18 DBest
Reply With Quote
  #19  
Old 07-31-2006, 02:41 PM
 
carpeperdiem carpeperdiem is offline
 

X-Guru
  
Join Date: Jul 2006
Location: New York City, USA
Posts: 5,399
 

Default

Quote:
Originally Posted by ecommerce
carpe, does the payment options determine if this works or not?

I have no idea... it does not work for me, with only "Credit Card" and "Gift Certificate" enabled.

Maybe moneysaver or another expert will chime in... this should be standard-issue, and I am willing to buy this from x-cart if the community doesn't have a solution.

It is against visa/mastercard rules to print the card number on a receipt -- but without some kind of card reference for the customer, they may not remember which card they used for refunds or basic accounting -- it's a common courtesy to give the customer this info... and sending an un-encrypted card number via email is simply reckless.

Hopefully someone will step forward. I'm taking this to x-cart next week.

Thanks!

Jeremy
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4
Reply With Quote
  #20  
Old 08-01-2006, 07:37 AM
  moneysaver67's Avatar 
moneysaver67 moneysaver67 is offline
 

Advanced Member
  
Join Date: Nov 2005
Posts: 74
 

Default

Quote:
Originally Posted by ecommerce
carpe, does the payment options determine if this works or not?


I will like to have paypal API, but it should just read credit card.
(paypal should be invisible)

fax order

phone order

money order

gift certificate

will it work with those options?


In short, the error is that the SQL statement does not know the ORDER # of the last order, which is kind of odd. There is a check that sees if the order_id param sent is empty, to reference from secure_oid, but still coming up blank.


This should be an easy fix... Does anyone know the best way to reference the Order ID of the order that just occurred?

The following returns the decoded order details from the orders table. Details for a given Order ID are returned based on the order_id parameter, $GLOBALS[orderid].

Code:
$dec_details = func_order_details( $GLOBALS[orderid] );

If
Code:
$orderid
is not the correct value to pass, please let us know.

There is a check to see if the param passed is empty, to pull from
Code:
$secure_oid[0]

In summary, the issues experienced are all a result of the missing orderid, which in turn causes the SQL to crash, which reports the 'N/A', etc...

What's more interesting is that it has been working perfectly fine on my end, but not for others?
__________________
X-Cart 4.0.16-.19 Gold [unix] / DSEFU
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:31 AM.

   

 
X-Cart forums © 2001-2020