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

Easy Checkout Mod for X-Cart 3.5.x and 4.0.x

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #371  
Old 04-11-2005, 11:50 PM
 
zardos zardos is offline
 

Senior Member
  
Join Date: Jun 2004
Location: UK England
Posts: 140
 

Default

Hi Jon

Code:
I'm evaluating the code for ezRecommends and will be fixing some issues with gift certificates and with the points mod shortly.

Have you sorted this yet jon, when i'am taken back to ezrecommends when using gift certificate i need to have a message to let people know they are using a secondary payment method. I have tried this fix below but now message.

Code:
To change the gift certificate redirect, and to give them a message. This is 4.0, may be just slightly different for 3.5.x branch. Open /payment/payment_giftcert.php Find: Code: func_header_location($current_location.DIR_CUSTOMER."/cart.php?mode=checkout&paymentid=".@$paymentid); Replace with: Code: func_header_location($current_location.DIR_CUSTOMER."/cart.php?mode=checkout&giftcertapplied=Y"); Open cart.php After Code: require "./auth.php"; Add: Code: if ($giftcertapplied) { $smarty->assign("giftcertapplied", "Y"); } Open skin1/customer/main/checkout.tpl Find: Code: {elseif $payment_methods ne ""} After put: {if $giftcertapplied ne ""} {$lng.txt_giftcertapplied}</p>{/if} Then add the language variable through your admin txt_giftcertapplied - Your gift certificate has been applied. Please select a secondary payment method to complete your order.

Any news Jon

Thanks again
__________________
X-Cart V4.0.18
PHP 4.3.10
MySQL Server 4.0.22
Apache/1.3.33 (unix)
OS - Linux
Reply With Quote
  #372  
Old 04-12-2005, 01:10 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

For the points mod, Carrie has an updated file she can provide to integrate the 2 mods.

For ezRecommends compatibility with other functions, open cart.php and find all references (EXCEPT the new code provided with ezRecommends after the # Redirect):

FIND:

Code:
mode=checkout

REPLACE WITH:

Code:
mode=checkout&ezrecommends=Y
Reply With Quote
  #373  
Old 04-12-2005, 09:59 AM
 
zardos zardos is offline
 

Senior Member
  
Join Date: Jun 2004
Location: UK England
Posts: 140
 

Default

Hi Jon

Jon wrote
Code:
I'm evaluating the code for ezRecommends and will be fixing some issues with gift certificates and with the points mod shortly.

I wrote
Code:
Have you sorted this yet jon, when i'am taken back to ezrecommends when using gift certificate i need to have a message to let people know they are using a secondary payment method. I have tried this fix below but now message.

I found all the "mode=checkout" in cart.php and changed them to "mode=checkout&ezrecommends=Y"

I could not find this
Code:
func_header_location($current_location.DIR_CUSTOMER."/cart.php?mode=checkout&paymentid=".@$paymentid);

in /payment/payment_giftcert.php but did find this
Code:
# # Not enough money # func_header_location($current_location.DIR_CUSTOMER."/cart.php?mode=checkout"); }

and then i added this to it

Code:
# # Not enough money # func_header_location($current_location.DIR_CUSTOMER."/cart.php?mode=checkout&ezrecommends=Y&giftcertapplied=Y"); }

I now get a message the message that i entered in

Code:
txt_giftcertapplied - Your gift certificate has been applied. Please select a secondary payment method to complete your order.

and it is working so far

But i still recieve this error when i purchase a gift certificate

Code:
[12-Apr-2005 16:59:33] SQL error: /megapcs/cart.php SELECT DISTINCT productid2 as productid FROM xcart_product_links where ()) AND (productid2!='64' AND productid2!='70') ORDER BY RAND() LIMIT 4 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')) AND (productid2!='64' AND productid2!='70') ORDER BY RAND() Backtrace: /home/xxxxx/public_html/megapcs/include/func.php:120 /home/xxxxx/public_html/megapcs/include/func.php:80 /home/xxxxx/public_html/megapcs/include/func.php:164 /home/xxxxx/public_html/megapcs/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code(1) : eval()'d code:72 /home/xxxxx/public_html/megapcs/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code:1 /home/xxxxx/public_html/megapcs/modules/ezRecommends/ezrecommends.php(20) : eval()'d code:1 /home/xxxxx/public_html/megapcs/modules/ezRecommends/ezrecommends.php:20 /home/xxxxx/public_html/megapcs/cart.php:731

Cart.php :731 points to this:

Code:
# elseif($mode=="checkout" && !func_is_cart_empty($cart)) { include $xcart_dir."/modules/ezRecommends/ezrecommends.php"; $smarty->assign("main","ezrecommends"); } # # End Upselling Module #

What are the settings to be changed to Jon if the settings are causing the problem.

This setting seems to be OK.
Code:
$upsell_limit = "3";

This one does not,

Code:
$upsell_omit = array('');

Any idears??? Jon

Thanks again
__________________
X-Cart V4.0.18
PHP 4.3.10
MySQL Server 4.0.22
Apache/1.3.33 (unix)
OS - Linux
Reply With Quote
  #374  
Old 04-12-2005, 10:03 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Try changing this:

Code:
# elseif($mode=="checkout" && !func_is_cart_empty($cart)) { include $xcart_dir."/modules/ezRecommends/ezrecommends.php"; $smarty->assign("main","ezrecommends"); } # # End Upselling Module #

to:

Code:
# elseif(($mode=="checkout") && (!func_is_cart_empty($cart)) && ($giftcertapplied != "Y")) { include $xcart_dir."/modules/ezRecommends/ezrecommends.php"; $smarty->assign("main","ezrecommends"); } # # End Upselling Module #
Reply With Quote
  #375  
Old 04-12-2005, 11:18 AM
 
zardos zardos is offline
 

Senior Member
  
Join Date: Jun 2004
Location: UK England
Posts: 140
 

Default

Hi Jon

Thanks for the reply Jon, Changed the above code but no difference, when you are just about to go to the checkout to pay for the GC the error above shows on the screen for about 3-4 seconds, all is working but i need to get rid of this error.

Are there any php or tpl's you would like to look over and check, or try a test order on my site to purchase GC to see if that helps pin down the error.

Sorry about this, Thanks again Jon.
__________________
X-Cart V4.0.18
PHP 4.3.10
MySQL Server 4.0.22
Apache/1.3.33 (unix)
OS - Linux
Reply With Quote
  #376  
Old 04-12-2005, 03:18 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Ok I see the problem more clearly now. Are you able to provide FTP information via PM along with an exact URL so that I know I am editing the correct files.
Reply With Quote
  #377  
Old 04-12-2005, 03:21 PM
 
zardos zardos is offline
 

Senior Member
  
Join Date: Jun 2004
Location: UK England
Posts: 140
 

Default

Hi Jon

Thank for the reply i will pm you in the next few moments with details.
__________________
X-Cart V4.0.18
PHP 4.3.10
MySQL Server 4.0.22
Apache/1.3.33 (unix)
OS - Linux
Reply With Quote
  #378  
Old 04-12-2005, 05:03 PM
 
markwhoo markwhoo is offline
 

X-Adept
  
Join Date: Nov 2003
Posts: 799
 

Default

Quote:
Originally Posted by Jon
Hey Mark, the issues aside from the points mod have been resolved, as I believe we've spoken about already.

Carrie has a fix for the points mod so you'll have to contact her for an updated file. PM me if you have any questions or concerns.

Just an update on this for those that may be interested. (If you use Points Mods from Carrie at BCSE AND Jons exRecommends)

Carrie was able to change the redirect for the points mod when using the ezRecommends mod by Jon.

Now when points are used as payment method and end user runs short and cannot cover entire cart amount, the cart will redirect to payment method, but you WILL NOT get error message stating you need additional funds to complete purchase.

This will leave you either needing to have explicit instructions for end user to stop possible confusion, or simply remove the ability to pay with points and have end user request a Gift Certificate instead and admin deduct points for that due to Jon having a fix for the redirect to enable user to pay with Gift Certificate etc.


So, use Gift Cert not Points for purchase or no using ezRecommends as there is issue with payment error/notifications when using both.


Carrie has stated she hopes to add ability to post errors in future releases or version update that will be compatible with the ezRecommends Mod. No date specified...

My thanks go out to Jon for providing fix for the redirect when using Gift Certificate as payment method!
__________________
vs 4.1.12
Reply With Quote
  #379  
Old 04-13-2005, 12:46 PM
 
Tuner Tuner is offline
 

eXpert
  
Join Date: Jan 2003
Location: Scottsdale Arizona
Posts: 245
 

Default

Anyone have the need to Capture Unfinished Orders.
I have moded my 3.3.2 cart a while ago and it emails me the order info if the user goes past the login/register section. Then we contact them to ask if the are having problems.
__________________
\"Then again it could all be horse crap\"
by some old Guy.
4.013
Reply With Quote
  #380  
Old 04-13-2005, 07:13 PM
 
jmell jmell is offline
 

Senior Member
  
Join Date: Sep 2003
Posts: 127
 

Default

Yes Tuner I would love that for 4.0's
__________________
X-Cart 4.1.9
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4



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 09:41 PM.

   

 
X-Cart forums © 2001-2020