Page 1 of 2

[CubeCart] Speed Customers Mod

Posted: Thu Aug 06, 2009 4:43 am
by AIPman1
The Speed Customers Through Checkout mod by Estelle adds this code to the step1.inc:

Code: Select all

httpredir("index.php?_g=co&_a=reg&co=1");


after this line:

Code: Select all

httpredir("index.php?_g=co&_a=step2");


So the original redir works, but estelle's addition doesn't. There would need to be additional handling of that redir in the htaccess, I assume...but I would be unable to write it, don't know enough to.

If anyone can provide something to get the Speed Customers mod to work in Magic SEO, that would be great.

Magic SEO is supposed to not break any mods - so if I can help find a fix for this, then it's claim will remain solid, and it'll help the community.

I am sure that this is the line that breaks the checkout, commenting it back out in the code makes the checkout work fine...just without the benefit of the removing the step the mod is designed for.

Hope I spoke clearly and this is useful information. I have also posted similar information in the support thread for the mod itself...

here is that post:

http://www.cubecartforums.org/index.php ... st&p=43150

I will report any finding from either side of this to the other so that people searching for info can find it faster.

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 06, 2009 5:07 am
by inveo
Could you please post how your entire step1.inc.php file looks? It seems that the only problem is that you integrated this mod incorrectly.

Re: [CubeCart] Speed Customers Mod

Posted: Fri Aug 07, 2009 5:19 am
by AIPman1
here it is, thanks for looking:

Code: Select all

<?php
/*
+--------------------------------------------------------------------------
|   CubeCart 4
|   ========================================
|   CubeCart is a registered trade mark of Devellion Limited
|   Copyright Devellion Limited 2006. All rights reserved.
|   Devellion Limited,
|   5 Bridge Street,
|   Bishops Stortford,
|   HERTFORDSHIRE.
|   CM23 2JU
|   UNITED KINGDOM
|   http://www.devellion.com
|   UK Private Limited Company No. 5323904
|   ========================================
|   Web: http://www.cubecart.com
|   Email: info (at) cubecart (dot) com
|   License Type: CubeCart is NOT Open Source Software and Limitations Apply
|   Licence Info: http://www.cubecart.com/v4-software-license
+--------------------------------------------------------------------------
|   step1.inc.php
|   ========================================
|   Step 1 Of the Checkout Pages (Login/Sign Up)   
+--------------------------------------------------------------------------
*/
if(!defined('CC_INI_SET')){ die("Access Denied"); }

// include lang file
$lang = getLang("includes".CC_DS."content".CC_DS."step1.inc.php");

$enableSSl = 1;
require_once("classes".CC_DS."cart".CC_DS."shoppingCart.php");
$cart = new cart();
$basket = $cart->cartContents($cc_session->ccUserData['basket']);

if($cc_session->ccUserData['customer_id']>0) {
   httpredir("index.php?_g=co&_a=step2");
}
/* start mod: Speed new customers through checkout - http://cubecart.expandingbrain.com */
else
{
   httpredir("index.php?_g=co&_a=reg&co=1");
}
/* end mod: Speed new customers through checkout - by Estelle */

$login_register = new XTemplate ("content".CC_DS."step1.tpl");

$login_register->assign("LANG_CART",$lang['step1']['cart']);
$login_register->assign("LANG_CHECKOUT",$lang['step1']['checkout']);
$login_register->assign("LANG_PAYMENT",$lang['step1']['payment']);
$login_register->assign("LANG_COMPLETE",$lang['step1']['complete']);

if($basket == false) {
   $login_register->assign("LANG_CART_EMPTY",$lang['step1']['lang_empty_cart']);
   $login_register->parse("session_page.cart_false");
   } else {
   $login_register->assign("LANG_LOGIN_TITLE",$lang['step1']['allready_customer']);
   $login_register->assign("LANG_LOGIN_BELOW",$lang['step1']['login_below']);
   $login_register->assign("VAL_SELF",urlencode( currentPage()) );
   $login_register->assign("LANG_USERNAME",$lang['step1']['username']);
   
   if(isset($_POST['username'])) {
      $login_register->assign("VAL_USERNAME",sanitizeVar($_POST['username']));
   }
   
   $login_register->assign("LANG_PASSWORD",$lang['step1']['password']);
   $login_register->assign("LANG_REMEMBER",$lang['step1']['remember_me']);
   $login_register->assign("TXT_LOGIN",$lang['step1']['login']);
   $login_register->assign("LANG_FORGOT_PASS",$lang['step1']['forgot_pass_q']);
   $login_register->assign("LANG_EXPRESS_REGISTER",$lang['step1']['need_register']);
   $login_register->assign("LANG_CONT_REGISTER",$lang['step1']['express_register']);
   $login_register->assign("LANG_REGISTER_BUTN",$lang['step1']['reg_and_cont']);
   $login_register->assign("LANG_CONT_SHOPPING",$lang['step1']['cont_shopping_q']);
   $login_register->assign("LANG_CONT_SHOPPING_BTN",$lang['step1']['cont_shopping']);
   $login_register->assign("LANG_CONT_SHOPPING_DESC",$lang['step1']['cont_browsing']);
   $login_register->parse("session_page.cart_true");

}

$login_register->parse("session_page");
$page_content = $login_register->text("session_page");
?>

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 13, 2009 2:44 pm
by inveo
I just reproduced this problem in test environment. It does not work because CubeCart violates RFC for sending some HTTP headers.

You can workaround it by adding following code to the end of the .htaccess file:

For single language mode:

Code: Select all

#index.php - Fixing non-RFC redirection (Speed Customers Mod)
RewriteCond %{QUERY_STRING} ^_g=co&_a=reg&co=1
RewriteRule ^shopping-cart/index.php$ index.php [R=301,L,QSA]


For multi-language mode:

Code: Select all

#index.php - Fixing non-RFC redirection (Speed Customers Mod)
RewriteCond %{QUERY_STRING} ^_g=co&_a=reg&co=1
RewriteRule ^([a-z]{2})/shopping-cart/index.php$ index.php [R=301,L,QSA]

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 20, 2009 4:41 am
by AIPman1
I'll test that out and thank you!

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 20, 2009 6:19 am
by AIPman1
works fine, thanks again!

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 20, 2009 6:50 am
by AIPman1
Ok, one small related issue to this mod still....

this mod adds links on the register page of the checkout, so if you are not already logged in, in speeding through checkout, you see:

Already have an account? Please log in or use the forgot password feature if you cannot remember your password.

the login URL is: http://www.dimestoredistro.com/account/ ... co&_a=cart

which, after logging in, should bring you back to the cart, but instead, is ignoring the redir part, and going back to the homepage.

So perhaps to complete the full compatibility of this mod, we need further work-around in the httacces?

Thank you for your attention to this. The mod FUNCTIONS now, but the redirect to the homepage could annoy repeat customers...

Re: [CubeCart] Speed Customers Mod

Posted: Thu Aug 20, 2009 6:04 pm
by inveo
This is also caused by violating a RFC - CubeCart uses two exclamations marks in URL (just like this MOD) and this is not allowed.

The easisest way how to solve it is to replace added code in language/en/includes/content/reg.inc.php:

Code: Select all

/* start mod: Speed new customers through checkout - http://cubecart.expandingbrain.com */
'email_in_use' => "An account already exists with that email address. Please <a href='login.html?redir=index.php&amp;_g=co&amp;_a=cart'>log in</a> or use the <a href='index.php?_a=forgotPass'>forgot password</a> feature if you cannot remember your password.",
/* end mod: Speed new customers through checkout - by Estelle */

Re: [CubeCart] Speed Customers Mod

Posted: Fri Aug 21, 2009 3:39 am
by AIPman1
I'll report that to the mod writer...but any suggestions on what to change it TO?

Re: [CubeCart] Speed Customers Mod

Posted: Wed Aug 26, 2009 10:54 am
by inveo
Please see my previous post...

Cart  
(empty)

Cart Check out  »

Prices are tax inclusive.

The VAT rate for your country (US) * is 0,0 % because it is not a member of the European Union (EU).

* Please create an account if your country does not match.

Community feed
  • [Zen Cart] Can't execute Magic SEO URLs sitemaps
    I installed Magic SEO URLs Sitemaps Add-On for ZenCart MSU4.x/MSU5.x 2.0 on my server, when I try to generate sitemaps using: https://www.pechesudv155.owally.com/sitemaps.php I received :...
    by peter@pechesud.com
  • [phpBB3] Sharing users between phpBB / PrestaShop
    Hi i have 2 question 1- prestashop module support phpBB 3.3 ? 2- why we can not login in prestashop and phpbb with same user?
    by zohall
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: https://www.phpbb.com/customise/db/exte ... _userinfo/ I tried asking support from the author but for no avail, since now. My request for support...
    by Lord Phobos
  • [phpBB3] Upgrade to phpBB 3.2.3
    Hello.. after Upgrade to phpBB 3.2.3 I am getting this message.. How can I solve this issue..? Thank you
    by ingbrzy
  • [phpBB3] URL path changed
    Hello.. I have changed my site path after moving to new hosting and now can not activate SEO module.. new path http://www.miuios.cz/domains/miuios.cz/ could you help me? thank you
    by ingbrzy2
Join our support forum » Pre-Sales Questions »
Featured Testimonials

Guys, thank you for all your support, you've been absolutely amazing! Please feel free to use this as a review on your website.

Veronica, the owner of Rave Kit

I installed the WordPress and WooCommerce Accelerator from Inveostore and it was really easy to configure - unlike some other caching plugins, it did not break the more complicated bits of my site and my PageSpeed score has gone from E to B even on a shared hosting plan. Luke was really helpful and the support response was very quick - I am...

Mark, the owner of Digital Marketing Works

More Testimonials »