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)

markwhoo 03-02-2005 03:49 PM

Quote:

Originally Posted by markwhoo
Jon,

Which of the files can I edit to make the personal info appear a bit cleaner on the last check out page.

The lines under the stock layout from xcart are not as desirable as I would like.

It almost looks like a portion of register personal info or register contact info or maybe even a label tpl due to the slotted line usage.


Thanks Jon


Found it, nevermind...

thanks for the help

markwhoo 03-02-2005 06:53 PM

ok, I tired this change to the code to effect how xcart redirects after a gift certificate has been made and found I was still only redirected to the recomends page and not where I was supposed to go and see the message (applied or applied and choose payment for additional funds)

Code:

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.lbl_gift_cert_applied}</p>{/if}

Then add the language variable through your admin

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


So, my question is, how is this different for version 4.0.11 than it was for the earlier 4.0.x branch.


also noticed that the points payment methid needs the same style of redirect as the gift certificate due to possibly only having partial payment with points and partial with what ever, cc, money order, check etc.


Anyone have and input on this?


I also still need to know how to change boarder to another color besides white. I changed the background color in the tpl file and it still shows all white. I am guessing it is being overridden in the css, but do not know where. Could use a lil help on that also.


Thanks to those in advance that take the time...

zardos 03-06-2005 05:43 AM

Hi Jon

Can you help me with these errors Jon

Code:

[06-Mar-2005 14:23:40] SQL error: /megapcs4u/cart.php

1065 : Query was empty
Backtrace:
/home/xxxxxx/public_html/megapcs4u/include/func.php:120
/home/xxxxxx/public_html/megapcs4u/include/func.php:80
/home/xxxxxx/public_html/megapcs4u/include/func.php:164
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code(1) : eval()'d code:65
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code:1
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code:1
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php:20
/home/xxxxxx/public_html/megapcs4u/cart.php:718
-------------------------------------------------
[06-Mar-2005 14:23:40] SQL error: /megapcs4u/cart.php
SELECT DISTINCT productid2 as productid FROM xcart_product_links where ()) AND (productid2!='') 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!='') ORDER BY RAND() LIMIT 4' at line 1
Backtrace:
/home/xxxxxx/public_html/megapcs4u/include/func.php:120
/home/xxxxxx/public_html/megapcs4u/include/func.php:80
/home/xxxxxx/public_html/megapcs4u/include/func.php:164
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code(1) : eval()'d code:72
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code(1) : eval()'d code:1
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php(20) : eval()'d code:1
/home/xxxxxx/public_html/megapcs4u/modules/ezRecommends/ezrecommends.php:20
/home/xxxxxx/public_html/megapcs4u/cart.php:718
-------------------------------------------------


This seems to only go wrong when i use the gift certificate, all you other mods seem to work well. one other problem is the change the gift certificate redirect, and to give them a message when the certificate does not cover the cost, it will not show the message. It could be the above mod causing the problem.

John

zardos 03-06-2005 09:18 AM

Hi markwhoo

Home_Checkout.tpl for logout of ezcheckout

Code:

<form action="../include/login.php" method=post name=loginform>


Try this

Quote:

<form action="include/login.php" method=post name=loginform>



It works fine for me.

John

Jon 03-06-2005 07:08 PM

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

markwhoo 03-06-2005 07:55 PM

Quote:

Originally Posted by Jon
I'm evaluating the code for ezRecommends and will be fixing some issues with gift certificates and with the points mod shortly.


Sounds great! I look forward to it. :wink:

halestorm 03-07-2005 07:40 PM

I'm Back....

Jon,

On your site of the the steps you had an message saying something about the email may end up in the junk/bulk folder.

What page was that and how did you get it in?

Jon 03-08-2005 02:06 PM

I added it to skin1/customer/main/checkout.tpl

AFTER:

Code:

{if $payment_data.payment_method ne ""}

{capture name=dialog}
{include file="customer/main/customer_details.tpl"}
{/capture}
{include file="dialog.tpl" title=$lng.lbl_payment_details content=$smarty.capture.dialog extra="width=100%"}


lixy 03-09-2005 10:00 AM

Can anyone offer some advice on the following situation: When an incomplete registration form is submitted while in the easy checkout the page refreshes but fails to retain any info already entered into a field. When the register.tpl is accessed from the main site and and incomplete form is submitted the page is refreshed and any previous field data entered remains.

I need the register.tpl page within the easy checkout mod to retain any completed fields when an incomplete form is submitted. Thanks in advance!

ian_fs 03-11-2005 03:04 AM

On a fresh installation of X-Cart with exCheckout installed I receive this error when ever trying to login / logout of customer and admin:

Code:

Parse error: parse error, unexpected '}' in W:\www\dev\include\login.php on line 203

line number changes between 201 and 203 depending if there is a white space before the code is modified.

The code in question is:

Code:

[b]Find[/b]

 if ($login_type == "C" || $login_type == "B") {
if (!func_is_cart_empty($cart)) {
if((strpos($HTTP_REFERER, "mode=auth") === false) && (strpos($HTTP_REFERER, "mode=checkout") === false)) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}

[b]Replace With[/b]

if ($login_type == "C" || $login_type == "B") {
if($redirect2 == "checkout") {
func_header_location($redirect_to."/cart.php?mode=checkout")
} elseif (!func_is_cart_empty($cart)) {
if((strpos($HTTP_REFERER, "mode=auth") === false) && (strpos($HTTP_REFERER, "mode=checkout") === false)) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}


It is with the replacement code that the problem is occuring. This error has now happened on two versions of fresh installs of X-Cart when testing to check I was double sure.

Ian[/b][/code]

Jon 03-11-2005 08:59 AM

This version should have been corrected and you should have been sent an updated copy already.

The code:

Code:

func_header_location($redirect_to."/cart.php?mode=checkout")

Should have a ";" on the end of it.

Code:

func_header_location($redirect_to."/cart.php?mode=checkout");

pengrus 03-14-2005 07:38 PM

Jon,

How easy to upgrade the x-cart if your ezcheckout, or ezrecomment or ezupsell is installed?

I am currently on x-cart 4.12.

hooter 03-14-2005 08:36 PM

Pengrus,

From a third-party support perspective I can say I have several clients who use a combination of one or more of Jon's conversion mods - and upgrades within the 4.0x series have all been painless.

That is to say, any issues with the upgrades that I did happen to encounter were totally unrelated to Jon's mods. :wink:

Jon 03-15-2005 12:23 PM

^ Thanks for the perspective.

The mods are also very straight forward to install for anyone with basic knowledge of php and template editing (i.e. Put this code after this code, etc.) so reinstalls are not at all time consuming.

pengrus 03-15-2005 12:32 PM

I am using Fashion Mosaic custom skin from X-cart. Will the add-ons use the stylesheet and graphics from Fashion Mosaic? Especially the Tab for the easy Checkout?

Thanks!

Jon 03-15-2005 01:21 PM

The checkout has it's own template (home_checkout.tpl) which frames the checkout process, however it uses the default x-cart stylesheet and the components of checkout remain styled the same.

The "tabs" of the checkout will use the same font and link style sheet, and the "grey" color can be edited easily by modifying css in home_checkout.tpl.

So in short, the style is the same, with the exception of the color of the tabs which can be easily edited.

taltos1 03-18-2005 08:22 PM

I installed it and I am having some problems. I got the mod from EWDHosting and followed the file "X-Cart Easy Checkout - Custom Installation - 4.0.x" that was included with the .zip

I get the error:
"Parse error: parse error, unexpected T_VARIABLE in ....public_html/cart.php on line 112"

When I click on "buy now" on a item.

Area of error.
Quote:

#
# Calculate total number of checkout process steps
#
$smarty->assign("mode",$mode)
$total_checkout_steps = 2;
$checkout_step_modifier["anonymous"] = 0;
$checkout_step_modifier["payment_methods"] = 0;

Also, in the instructions, the areas that detail the "Open include/login.php"
and "Open include/register.php" and what to edit in them does not correspond to what is in the original files...

Thank you very much for you help.

Jon 03-18-2005 10:06 PM

The code you've shown is missing a semi-colon.

Code:

$smarty->assign("mode",$mode)

Should be:

Code:

$smarty->assign("mode",$mode);

Your instructions should say that if register.php does not correspond, then no edits are necessary. I'll speak to Emerson to ensure that he has and updated file.

Can you post your login.php code please.

taltos1 03-19-2005 04:23 AM

Here is the original login.php (well part of it, do you need to see it all)

Quote:


if ($login_type == "C" || $login_type == "B") {
if (!func_is_cart_empty($cart)) {
if((strpos($HTTP_REFERER, "mode=auth") === false) && (strpos($HTTP_REFERER, "mode=checkout") === false)) {
func_header_location($redirect_to."/cart.php");
} else {
func_header_location($redirect_to."/cart.php?mode=checkout");
}
} elseif (!empty($HTTP_REFERER)) {
if((strncasecmp($HTTP_REFERER,$http_location,strle n($http_location))==0 || strncasecmp($HTTP_REFERER,$https_location,strlen($ https_location))==0) &&
strpos($HTTP_REFERER,"error_message.php")===false &&
strpos($HTTP_REFERER,'secure_login.php')===false &&
strpos($HTTP_REFERER,".php")!==false) {
func_header_location($redirect_to.strrchr($HTTP_RE FERER, "/"));
}
}
func_header_location($redirect_to."/home.php");
}

And in the install instructions it says to find and replace this section
Quote:

if ($login_type == "C" || $login_type == "B") {
if (!func_is_cart_empty($cart)) {
func_header_location($redirect_to."/cart.php");

And for register.php here is the original

Quote:

elseif ($action == "cart") {
if (!empty($reg_error) || !empty($av_error) || !empty($av_recheck)) {
if (empty($login))
# Anonymous checkout
$script = "cart.php?mode=checkout";
elseif (!empty($paymentid))
$script = "register.php?mode=update&action=cart&paymentid=". intval($paymentid);
else
$script = "register.php?mode=update&action=cart";

And your isntructions say to find
Quote:

elseif ($action == "cart") {
if (empty($paymentid))
$script = "cart.php";

So I am not sure what to do as they are a bit different....
Thanks again

heartsfire 03-19-2005 07:41 AM

Unexpected Action
 
I downloaded and installed the excheckout mod on 3/18 Version 4.0.12. Everything seemed to go well (a couple of errors caused by extra } or { but nothing serious). Did not modify register.php since the code seemed to be there (with some additional lines).

Everything seemed to work but if I abandon a cart while anonymous I then get dumped back to a login / register page rather than home.php and the cart does not empty. This happens even if I close the browser and then return later. It will still show the cart as having an item while anonymous and will add new items to the total of the existing cart.

If I delete the item from the cart as anonymous it doesn't remove it and since you cannot login the customer is stuck with a shopping cart item they can't get rid of. There are no errors showing in relation to this behavior.

I removed the mod temporarily until I can get some insight into this behavior. Any feed back would be greatly appreciated.

pengrus 03-21-2005 11:29 PM

I am also on 4.012. I am going to wait for a solution before I buy it.. Thanks!

Jon 03-22-2005 01:47 PM

All mods will be reviewed with 4.0.12 in the next 2 days and an update will be posted here. If you've purchased the mod and want an updated copy, PM me with your order # and email address, and please mention if you purchased through WebsiteCM.com or a reseller.

Jon 03-22-2005 10:24 PM

All mods have been verified to work with 4.0.12. Details below.

ezCheckout
ezCheckout has been confirmed to work on X-Cart 4.0.12 without any changes to the install instructions. If you have a zip file that is not titled ezcheckout-mar2005.zip you may want to contact us with your order # and place of purchase to receive a new installation file.

http://www.websitecm.com/store/customer/product.php?productid=69

ezUpsell
ezUpsell has been confirmed to work on X-Cart 4.0.12 without any changes to the install instructions.

NOTE: This module compliments ezCheckout very well, as ezCheckout takes the customer away from the store front, ezUpsell allows them to choose when they want to leave the store, and doesn't interupt the shopping experience.

http://www.websitecm.com/store/customer/product.php?productid=84

Remember Me
The "Remember Me" mod has been confirmed to work on 4.0.12 without any changes to the install instructions.

http://www.websitecm.com/store/customer/product.php?productid=89

ezRecommends
ezRecommends has been confirmed to work on X-Cart 4.0.12 without any changes to the install instructions.

Additional instructions have been provided however, to prevent people from being shown recommended products after returning from a failed order.

Open skin1/main/error_ccprocessor_error.tpl
Find:
Code:

cart.php?mode=checkout
REPLACE with:
Code:

cart.php?mode=checkout&ezrecommends=Y

Open skin1/main/error_ccprocessor_unavail.tpl
Find:
Code:

cart.php?mode=checkout
REPLACE with:
Code:

cart.php?mode=checkout&ezrecommends=Y

http://www.websitecm.com/store/customer/product.php?productid=86&cat=0&page=

ETInteractive.com 03-23-2005 05:35 AM

Jon,

Maybe i missed this, but.

On your site, every page has # of items and Total at the top. This should be standard on your mod.

I have the 3.5.x version and it does not do this.

So when i go to Payment Confirmation, I cant remember what Im being billed....

pokeey 03-24-2005 05:08 PM

No Go To Login
 
First off kudos on the EZ Cart Mod. This thing rocks and I wish all stores made it this eay :)

I have run into a problem though. :(

On checkout when I click the link On the "cart.php?mode=checkout" in tnese paragraph:

Quote:

If you already have an account, please login from here. If you are a new customer we need to know your personal details. Please fill in the form below and click 'Submit'.


On the "cart.php?mode=checkout"

All I come up with is a blank page. No way to login.

Here's my source of the login page:
Quote:

<HTML>
<HEAD>
<TITLE>
Your shopping cart
:: Sheer Miracle Mineral Makeup
</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<META name="description" content="The Best Mineral Makeup Discount Web Store">
<META name="keywords" content="best mineral makeup, discount mineral makeup, natural foundation, blush, cosmetics, essential skin care, essentials discount cosmetic brushes">
<link rel="stylesheet" href="/mineral-makeup/skin1/skin1.css">

<script language=JavaScript1.3 src="/mineral-makeup/skin1/copybilling1.js"></script>

<style type="text/css">
td.menuback{
background-color: #C0C0C0;
border-bottom: 1px #000000 solid;
border-left: 1px #808080 solid;
border-top: 1px #808080 solid;
}
td.menubackright{
background-color: #C0C0C0;
border-bottom: 1px #000000 solid;
border-right: 1px #808080 solid;
border-left: 1px #808080 solid;
border-top: 1px #808080 solid;
}
td.menu {
background-color: #FFFFFF;
border-left: 1px #000000 solid;
border-top: 1px #000000 solid;
border-right: 1px #000000 solid;
}
td.border {
border-left: 1px #000000 solid;
border-bottom: 1px #000000 solid;
border-right: 1px #000000 solid;
}
td.borderbottom {
border-bottom: 1px #000000 solid;
}
</style>

</head>
<body bgcolor="#FFFFFF">



<div align="center">
<center>

<table border="0" width="700" cellspacing="0" cellpadding="0">
<tr>
<td class="borderbottom">


[img]skin1/images/secure_checkout.gif[/img]</p>
</td>
<td width="480" valign="bottom">
<table border="0" width="100%" height="30" cellspacing="0" cellpadding="0">
<tr>
<td width="80" align="center" class="menuback">Store</td>
<td width="80" align="center" class="menuback">Your cart</td>
<td width="80" align="center" class="menuback">Login</td>
<td width="80" align="center" class="menuback">Method</td>
<td width="80" align="center" class="menuback">Payment</td>
<td width="80" align="center" class="menubackright">Confirmation</td>
</tr>
</table>
</td>
</tr>
</table>

<table border="0" width="700" bgcolor="#FFFFFF" cellspacing="0" cellpadding="8" align="center">
<tr>
<td width="100%" class="border">







</td>
</tr>
</table>
</center>
</div>



</body>
</html>

Anyone have any ideas?

Also I will be the first to admit that I suck at PHP and .tpls but is there a way to put a login box right in the On the "cart.php?mode=checkout" page?

Any help will be deeply deeply appreciated! :)

Chris

Jon 03-24-2005 06:31 PM

^ That portion of the code should be irrelevant. ezCheckout provides a login page that puts the login and the registration on the same page to avoid confusion and/or customers who miss that link text.

Probably you did not upload two files which were provided with the installation:

skin1/customer/main/anonymous_login.tpl and skin1/customer/main/customer_login.tpl

pokeey 03-25-2005 07:31 AM

Jon,

I am an idiot. I should have questioned operator error first.

I had to reinstall the skins and forgot to upload those.

This thing rocks now!

Chris

Jon 03-25-2005 08:17 AM

Great :)

Don't know if you've seen it already, but you may also want to consider ezUpsell, it removes x-carts forcing of them into the shopping cart before they are ready (or the option of staying on the same page which confuses them as to if the product's been added) by giving them the option of Continuing Shopping or Checking Out.

http://www.websitecm.com/store/customer/product.php?productid=84&cat=0&page=

pengrus 03-27-2005 11:22 AM

Quote:

Originally Posted by Jon
The continue shopping button and items come as an addon to ezCheckout with the ezRecommends module. Since they are adding products during checkout, I felt it was important to keep them updated with a total through the process.


Jon,

I also like to have the ezRecommends with ezCheckout. They are really perfect match. However, I feel it is a little redundant with the random upsell that comes with x-cart.

What I wish to see is:
ezRecommend has a config setting that can specify x number of "Also Bought" items to show and y number of "Random upsell" to show.

If this is possible, I might just enable 3 "Also Bought" and 1 random as I feel Also Bought should carry more weight.

My understanding is that right now it is RANDOM display a mixture of "Also Bought" and "Random Upsell" without further control. Am I right on this?

Thanks a lot for looking into this.

Jon 03-27-2005 03:37 PM

^ It takes customer also boughts, and the upsell links that you specify in your admin section. It doesn't take anything random.

I could code it to specify how much it takes of each but that would beyond the mod and would require custom work.

pengrus 03-27-2005 06:33 PM

Thank you, Jon.

I purchased the ezCheckout for now. I have finished the installation, and have a couple of questions:

1. It seems the ezcheckout page still use quite a lot default css variables from the default orange theme skin (skin1.css) such as the link, and font color and the price color, etc. How can I link it to my custom skin css that's on the Customer page?

2. The buttons like Checkout and Submit on the ezCheckout page are different from my custom skin's buttons. I am using Fashion Mosaic skin. I think this is also related to question 1, it links to skin1.css instead of skin1_customer.css.

Edited: I found that on the home_checkout.tpl , we need to replace the {#CSSFile#} with skin1_customer.css to solve above problem

Could you please help?

Thank you very much!

Jon 03-27-2005 07:31 PM

Change:

Code:

<link rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">

to:

Code:

<link rel="stylesheet" href="{$SkinDir}/skin1_customer.css">

pengrus 03-27-2005 07:44 PM

Thank you, Jon. Beautifully done... I just checked walmart.com, officedepot.com and amazon.com and realize they all have very simplified check out process like yours. I learned a lot from your mod. Thank you very much!

Jon 03-30-2005 09:00 PM

For users of 4.0.13 there's an update needed for ezUpsell.

The cart.php code is different.

Open cart.php

Find:
Code:

#
# Redirect
#
if($mode=="add" and $productid) {
    if(!empty($active_modules['SnS_connector'])) {
          func_generate_sns_action("AddToCart", $productid);
    }
    if($config["General"]["redirect_to_cart"]=="Y") {
          func_header_location("cart.php");
    } else{
          if(!empty($HTTP_REFERER)) {
              func_header_location($HTTP_REFERER);
          } else {
              func_header_location("home.php?cat=$cat&page=$page");
          }
    }
} elseif (!empty($is_sns_action)) {


REPLACE with:

Code:

#
# Redirect
#
if($mode=="add" and $productid) {
    if(!empty($active_modules['SnS_connector'])) {
          func_generate_sns_action("AddToCart", $productid);
    }
    #if($config["General"]["redirect_to_cart"]=="Y") {
    #    func_header_location("cart.php");
    #} else{
    #    if(!empty($HTTP_REFERER)) {
    #          func_header_location($HTTP_REFERER);
    #    } else {
    #          func_header_location("home.php?cat=$cat&page=$page");
    #    }
    #}
    if($mode=="add" and $productid) {
          func_header_location("added.php?cat=$cat&productid=$productid&amount=$amount");
    }
} elseif (!empty($is_sns_action)) {


pokeey 03-31-2005 06:03 PM

Jon doing that gives me a "file not found."

Anyway I emailed you earlier for install. (sheermiracle)

I did EZ-Cart no problem but EZ-Upsell has me stumped ](*,)

Chris

Jon 03-31-2005 08:45 PM

^ Just emailed you about it.

kalmaster 04-01-2005 07:21 AM

Hmm... I haven't had any problems with the MOD
Thanks alot guys!

pokeey 04-01-2005 10:45 AM

Jon,

Payment sent dude and Thankx. :wink:

Chris

Jon 04-01-2005 11:05 AM

^ All done.

Took some trouble shooting, but found that the problem was simply that home_main.tpl did not have the ezUpsell code implemented in it.

I modified your cart.php to put in the required redirect, updated your home_main.tpl, and ensured that everything is working.

You'll also want to reimplement the language variables as per the installation instructions. If you'd like to PM me admin details I will do this for you also.

Oh, and you may want to also update your signature with 4.0.13 ;)

pokeey 04-01-2005 11:48 AM

Jon,

Thank you!

Quote:

You'll also want to reimplement the language variables as per the installation instructions
I didn't get install instructions. So I was "winging it."

Here's the page:<blockquote>
versions of 4.0.x, specifically the 4.0.12 branch.

Please note that this will override the option in your admin section to redirect to the cart.php or not. You will however be able to easily disable this mod if for any reason you need to do so in the future.

To contact us please visit: http://www.websitecm.com/contact/
[/quote]

The 4.0 link went no where. Just back to the folder. Hmph?

I'll pm you my details

Thanks again.

Chris


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

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