X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Easy Checkout Mod for X-Cart 3.5.x and 4.0.x (https://forum.x-cart.com/showthread.php?t=9085)

zardos 04-11-2005 11:50 PM

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

Jon 04-12-2005 01:10 AM

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

zardos 04-12-2005 09:59 AM

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 :lol:

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

Jon 04-12-2005 10:03 AM

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
#


zardos 04-12-2005 11:18 AM

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.

Jon 04-12-2005 03:18 PM

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.

zardos 04-12-2005 03:21 PM

Hi Jon

Thank for the reply i will pm you in the next few moments with details.

markwhoo 04-12-2005 05:03 PM

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... 8O

My thanks go out to Jon for providing fix for the redirect when using Gift Certificate as payment method!

Tuner 04-13-2005 12:46 PM

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.

jmell 04-13-2005 07:13 PM

Yes Tuner I would love that for 4.0's


All times are GMT -8. The time now is 03:20 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.