My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
I wanted to share some things I've been working on. I moved the css/js loader code that loads the jscript files to the tpl_main_page.php just before the </body> tag to load the main content of the page sooner before the js files, see code below. note that you have also have to move any script for jquery functions to just below this js loader code for the jquery to work.
example jquery:PHP Code:
<?php
/**
* load the jscript loader files, this used to be combined with the css loader files in the html header file, moved here to load some of the page faster
*/
foreach($files['jscript'] as $file)
if($file['include']) {
include($file['src']);
} else if(!$RI_CJLoader->get('minify_js') || $file['external']) {
echo '<script type="text/javascript" src="'.$file['src'].'"></script>'."\n";
} else {
echo '<script type="text/javascript" src="min/?f='.$file['src'].'&'.$RI_CJLoader->get('minify_time').'"></script>'."\n";
}
?>
I also created an autoloader with if and else statements to load and minify my responsive css files depending on the mobile detect code or if display mode links are used (mobile, tablet and desktop display modes), I also use a css drop down menu at the top of the page to select links and display modes.Code:<!-- Start css3menu BODY section --> <script> $(document).ready(function(){ $(".pressed").click(function(){ $(".DropDownMenu").toggle(); }); $(".HideDropDownMenu").click(function(){ $(".DropDownMenu").hide(); }); $(".onerow-fluid").click(function(){ $(".DropDownMenu").hide(); }); $(".fancy_menu_close").click(function(){ $(".DropDownMenu").hide(); }); }); </script>
If anyone is interested, I added code to have a optional 2nd phone number field during the checkout process, which can also be changed for both shipping and billing addresses, and both phone numbers are displayed under the addresses on the checkout page, in the order confirmation emails, and everywhere else the addresses are shown. Useful for when you sell big expensive items that require delivery scheduling.
Since I only use the force checkout without account option, I changed the filename of no_account.php to begin_checkout.php, and changed the My Account texts to My Profile, and other similar changes.
And with the responsive detect code I'm able to make changes to the checkout_stacked file(s) and to have a different file for mobile view which only has one column in the checkout page, and I use the fec split view option for desktop mode and tablet view when in landscape view, and my begin_checkout page has just one column for mobile view (instead of the contact details fields being on the right side).
So if anyone wants the code let me know.
I plan to have more billing address countries than shipping address countries but have to avoid having a billing address copied to an invalid shipping address via the ' Same Address for Delivery/Billing ' checkbox,
I'm thinking that having an alert displayed, when this happens, is the way to go.
I'm going to attempt this myself but wondered whether anyone has already done something similar?
I am getting this error in my logs:
It only happens when a billing country with no states set up in the zones is chosen during guest or regular checkout AND when billing and shipping addresses are different. So for example, if I checkout with the UK as my country, and use it for billing and shipping, checkout works fine. If I checkout with UK as my billing country and a different country as my shipping country, I get the log error above. If I checkout with a country with zones (e.g. US) as my billing country, and UK as my shipping country, checkout works fine.Call to a member function RecordCount() on a non-object in /home/***/public_html/includes/modules/quick_checkout.php on line 339
So, to sum up, the error only happens when ALL of these conditions are met:
1. Shipping and billing are different
2. Billing address is a country with no zones (e.g. UK)
There are several countries that have no zones by default in zen-cart, so I assume the error is within the FEC mod? Any ideas on how I can fix this?
Danielle
Sorry if this is not the place for this... but...
I have my zen cart working nicely... and the FEC plugin...
I have an issue with the emails sent when a customer uses the 'Guest Checkout'
the email sent to the customer doesnt have Template Keywords replaced with the corect text.
if you sign up, and checkout, it all works as it should.
Could someone point me in the right direction to solve this problem...?
Cheers, and thanks in advance
![]()
You'll need to check customizations you've made to includes/classes/order.php. Make sure they match the modifications mentioned in the FEC docs. The only edit that is made to that file shouldn't cause the issue you are having. You may want to try redoing the modifications with a default file from the ZC 1.5.1 package (or whichever version you are using). If other mods have made modifications to that file, remember to also add them to your new file and make sure they do not conflict with the changes for FEC.
Also note: if using FEC, you should not be using the standalone Checkout Without Account mod.
FEC and PHP version 5.4 compatibility.
I have applied various patches to core PHP files as per:
http://www.zen-cart.com/showthread.p...27#post1224627
http://www.zen-cart.com/showthread.p...90#post1224790
and
http://www.zen-cart.com/showthread.p...HP-5-3-5-4-5-5
I notice that the most important changes relate to SHIPPING functions, and that PHP version 5.4, $_SESSION['shipping'] should always be treated as an array.
Within FEC, I am noticing things like:
.. which appears to need patching to:PHP Code:
$_SESSION['shipping'] = '';
and...PHP Code:
unset($_SESSION['shipping']);
should perhaps becomePHP Code:
if ($_SESSION['shipping']) {
PHP Code:
if (isset($_SESSION['shipping'])) {
and...
should perhaps becomePHP Code:
if ($_SESSION['shipping'] ==
----------------------------------------------------PHP Code:
if ($_SESSION['shipping']['id'] ==
Will it be necessary to make these patches (IF APPLICABLE), to files within the FEC module? If so, what files are involved, and what code lines are affected?
20 years a Zencart User
after install Fec ...
i got.. index.php?main_page=checkout&fecaction=null .(my checkout url)
how can i get index.php?main_page=checkout.... ?
Thanks
hi,
i have recently updated this module to the latest version. and i have most of it working....
i have gotten fast and easy part of working to my satisfaction; however i am having problems with the checkout as a guest. i get to the first screen which has the bill-to/ship-to information; when i click continue it will successfully validate everything on the screen and display error messages as necessary. however, if no errors are found, when posting the form, i stay on the page (main_page=no_account). it validates the form, and does not move forward to the next step.
there is nothing in my zen log or apache log to indicate any problem. i have a feeling that something is loading at the wrong time which is preventing the script from making it to the next page.
does anyone have any ideas where i could look to address this problem?
this problem existed prior to upgrading to the latest version as well; just an FYI.
thanks in advance for any help and suggestions.
You won't unless you disable the 'no account' option of FECin your admin area. I believe the URL is basically stating that the page being viewed is the FEC checkout page created by a customer opting to create an account as opposed to not creating (or vise versa, I'm not sure without actually logging on to my module testing site).
Bookmarks