steve_s Posted May 7, 2010 Share Posted May 7, 2010 Hi Steve Just one more problem I discovered after installing craftyclicks postcode finder, I notice that there are 2 postcode boxes on the checkout page the new one that postcode finder puts and the original one how do I remove the original one or comment it out as postcode finder will not work with both postcode forms showing I.E. it won't connect to postcode server because they are conflicting with each other. Hope that makes sense. Regards Liam Hi Liam There are several post code inpt boxes in /includes/checkout/billing_address.php will have to comment out each one, one by one till you get right one Steve Quote Link to comment Share on other sites More sharing options...
stClem Posted May 7, 2010 Share Posted May 7, 2010 Hi Again look at code it asks to add to any checkout page(s) and see if code is in checkout.php or includes/classes/onepage_checkout.php Steve Dont get it. Look for what in the code? Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 7, 2010 Share Posted May 7, 2010 Dont get it. Look for what in the code? The contribution that you added Steve Quote Link to comment Share on other sites More sharing options...
stClem Posted May 8, 2010 Share Posted May 8, 2010 Havent added any code to 'one page checkout'. But want to. dont now where to add it. Where is the qty update code in 'one page checkout' script? Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 8, 2010 Share Posted May 8, 2010 Havent added any code to 'one page checkout'. But want to. dont now where to add it. Where is the qty update code in 'one page checkout' script? you will have to look at the price break and qty block, where ever it asks to add code to any checkout pages, you will have to see if the same code is in one page checkout download simple search and replace is 1st link on google search point it to search in one page checkout contribution you downloaded and see if any code is there and what file to make changes to Steve Quote Link to comment Share on other sites More sharing options...
baggen Posted May 8, 2010 Share Posted May 8, 2010 Hi! Im thinking about installing this addon for my shop, will this work with a shop that has other languages installed? Can i still follow the standard instruction or do i need to do some modifications like copying files to my other language folders and modify something else? Regards / Erik Quote Link to comment Share on other sites More sharing options...
Guest Posted May 8, 2010 Share Posted May 8, 2010 Hi Liam There are several post code inpt boxes in /includes/checkout/billing_address.php will have to comment out each one, one by one till you get right one Steve Hi Steve Sorted it thank you but decided in the end not to use the postcode thingy as it did not look that great visually. I.E. The new craftyclicks Button and text not aligned properly with the new postcode input box. But still using the OPC as it is a great contribution. Thanks for your help Regards Liam Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 8, 2010 Share Posted May 8, 2010 Hi! Im thinking about installing this addon for my shop, will this work with a shop that has other languages installed? Can i still follow the standard instruction or do i need to do some modifications like copying files to my other language folders and modify something else? Regards / Erik Hi Erik, You will have to do some translating of language files, uses standard latin chars, best to avoid special chars unless you use the utf8 code for the char Steve Quote Link to comment Share on other sites More sharing options...
gandahar Posted May 10, 2010 Share Posted May 10, 2010 Hi i'm looking for a solution to my problem : im using onepage checkout and discount coupon codes (both last version) work fine but one issue for me : to limit the use of coupons, look at the screenshot, i set a limit of 1 use and 1 global coupon but i can use it with no limit !!!! i've been looking the code for hours, and i can't understand why the limit can't work!!! I need to know when we count the use of coupons and i think the solution can be in the way of onepage checkout do it please help thanks all Quote /// Link to comment Share on other sites More sharing options...
Frisser Posted May 10, 2010 Share Posted May 10, 2010 work fine but one issue for me : to limit the use of coupons, i've been looking the code for hours, and i can't understand why the limit can't work!!! Yes... please have anyone got a solution for this. I have also worked on this for hours! Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 10, 2010 Share Posted May 10, 2010 Yes... please have anyone got a solution for this. I have also worked on this for hours! it has to be in includes/classes/onepage_checkout.php in this function function redeemCoupon($code){ //BOF KGT if (MODULE_ORDER_TOTAL_COUPON_STATUS == 'true'){ //EOF KGT global $customer_id, $order; $error = false; if ($code) { // get some info from the coupon table $coupon_query = tep_db_query("select coupon_id, coupon_amount, coupon_type, coupon_minimum_order,uses_per_coupon, uses_per_user, restrict_to_products,restrict_to_categories from " . TABLE_COUPONS . " where coupon_code='".$code."' and coupon_active='Y'"); $coupon_result = tep_db_fetch_array($coupon_query); if ($coupon_result['coupon_type'] != 'G') { if (tep_db_num_rows($coupon_query) == 0) { $error = true; $errMsg = ERROR_NO_INVALID_REDEEM_COUPON; } $date_query = tep_db_query("select coupon_start_date from " . TABLE_COUPONS . " where coupon_start_date <= now() and coupon_code='".$code."'"); if (tep_db_num_rows($date_query) == 0) { $error = true; $errMsg = ERROR_INVALID_STARTDATE_COUPON; } $date_query = tep_db_query("select coupon_expire_date from " . TABLE_COUPONS . " where coupon_expire_date >= now() and coupon_code='".$code."'"); if (tep_db_num_rows($date_query) == 0) { $error = true; $errMsg = ERROR_INVALID_FINISDATE_COUPON; } $coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'"); $coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "' and customer_id>0"); if (tep_db_num_rows($coupon_count) >= $coupon_result['uses_per_coupon'] && $coupon_result['uses_per_coupon'] > 0) { $error = true; $errMsg = ERROR_INVALID_USES_COUPON . $coupon_result['uses_per_coupon'] . TIMES; } if (tep_db_num_rows($coupon_count_customer) >= $coupon_result['uses_per_user'] && $coupon_result['uses_per_user'] > 0) { $error = true; $errMsg = ERROR_INVALID_USES_USER_COUPON . $coupon_result['uses_per_user'] . TIMES; } if ($error === false){ global $order_total_modules, $cc_id; if (!tep_session_is_registered('cc_id')) tep_session_register('cc_id'); $cc_id = $coupon_result['coupon_id']; $order_total_modules->pre_confirmation_check(); return '{ success: true }'; } } } //BOF KGT }else { if(MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS=='true') { global $customer_id, $order; $check_code_query = tep_db_query( $sql = "SELECT dc.* FROM " . TABLE_DISCOUNT_COUPONS . " dc WHERE coupons_id = '".tep_db_input( $code )."' AND ( coupons_date_start <= CURDATE() OR coupons_date_start IS NULL ) AND ( coupons_date_end >= CURDATE() OR coupons_date_end IS NULL )" ); if( tep_db_num_rows( $check_code_query ) != 1 ) { //if no rows are returned, then they haven't entered a valid code $message = ENTRY_DISCOUNT_COUPON_ERROR ; //display the error message return '{ success: false }'; } else { if(tep_session_is_registered('customer_id') && (int)$customer_id>0) { //customer_exclusions $check_user_query = tep_db_query( $sql = 'SELECT dc2u.customers_id FROM '.TABLE_DISCOUNT_COUPONS_TO_CUSTOMERS.' dc2u WHERE customers_id='.(int)$customer_id.' AND coupons_id="'.tep_db_input( $code ).'"' ); if( tep_db_num_rows( $check_user_query ) > 0 ) { $message = ENTRY_DISCOUNT_COUPON_ERROR ; //display the error message //use this to debug exclusions: //$this->message( 'Customer exclusion check failed' ); return '{ success: false }'; } } Steve Quote Link to comment Share on other sites More sharing options...
Frisser Posted May 11, 2010 Share Posted May 11, 2010 New problem. I have 2 shipping methods for 2 countries. In Internet Explorer if I fill in the billing address it won't update the shipping methods. Only when I select country to a different country a couple of times it updates the shipping method. Also if I update the cart it will update the shipping method. Anyone? Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 11, 2010 Share Posted May 11, 2010 New problem. I have 2 shipping methods for 2 countries. In Internet Explorer if I fill in the billing address it won't update the shipping methods. Only when I select country to a different country a couple of times it updates the shipping method. Also if I update the cart it will update the shipping method. Anyone? im not sure about this, does it work fine in other browsers, if yes report it as a bug to itwebexperts.com using email address in install guide to report bugs to Steve Quote Link to comment Share on other sites More sharing options...
gandahar Posted May 12, 2010 Share Posted May 12, 2010 it has to be in includes/classes/onepage_checkout.php is the quantity of use of the coupon not stored in database? is it dynamically calculated with the table discount_coupons_to_orders using then number entry corresponding with the coupon name ?? interesting question ! when i look the function redeemCoupon in includes/classes/onepage_checkout.php i can see : $coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'"); $coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "' and customer_id>0"); is TABLE_COUPON_REDEEM_TRACK the real name of a table ? i can't find it in my database !!! and i do a search in all files of my oscommerce to find another instance of TABLE_COUPON_REDEEM_TRACK and it only appear two times in the function redeemCoupon in includes/classes/onepage_checkout.php !!! I'm missing something ??? i've been testing another thing to try to understand better : I created a new coupon that everyone can use it except me. (using customer exclusion) I tried to use it, one page checkout tell me that the coupon is not valid but it is still subtract the coupon amount from the total like if it was valid ! so i think there is a missing link in the chain... or something bad somewhere... if anyone with a working installation of onepage checkout and discount coupon can check if the table TABLE_COUPON_REDEEM_TRACK exist ?? thanks (sorry for my bad bad english :-" ) Quote /// Link to comment Share on other sites More sharing options...
steve_s Posted May 12, 2010 Share Posted May 12, 2010 is the quantity of use of the coupon not stored in database? is it dynamically calculated with the table discount_coupons_to_orders using then number entry corresponding with the coupon name ?? interesting question ! when i look the function redeemCoupon in includes/classes/onepage_checkout.php i can see : $coupon_count = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."'"); $coupon_count_customer = tep_db_query("select coupon_id from " . TABLE_COUPON_REDEEM_TRACK . " where coupon_id = '" . $coupon_result['coupon_id']."' and customer_id = '" . $customer_id . "' and customer_id>0"); is TABLE_COUPON_REDEEM_TRACK the real name of a table ? i can't find it in my database !!! and i do a search in all files of my oscommerce to find another instance of TABLE_COUPON_REDEEM_TRACK and it only appear two times in the function redeemCoupon in includes/classes/onepage_checkout.php !!! I'm missing something ??? i've been testing another thing to try to understand better : I created a new coupon that everyone can use it except me. (using customer exclusion) I tried to use it, one page checkout tell me that the coupon is not valid but it is still subtract the coupon amount from the total like if it was valid ! so i think there is a missing link in the chain... or something bad somewhere... if anyone with a working installation of onepage checkout and discount coupon can check if the table TABLE_COUPON_REDEEM_TRACK exist ?? thanks (sorry for my bad bad english :-" ) Hi If no define for TABLE_COUPON_REDEEM_TRACK in includes/database_tables.php then you have a different coupon system installed is all i can think off Steve Quote Link to comment Share on other sites More sharing options...
gandahar Posted May 13, 2010 Share Posted May 13, 2010 Hi If no define for TABLE_COUPON_REDEEM_TRACK in includes/database_tables.php then you have a different coupon system installed is all i can think off Steve Hi Steve, thank you This is the Discount coupon contribution i have installed (Not CCVG) do you have this one installed ? in the package of the very last version of onepage checkout (18 Apr 2010) a file named "kgt_howto.txt" is included, so i'm sure i'm using the same version and into this file there is nothing about TABLE_COUPON_REDEEM_TRACK as you can see (from kgt_howto.txt) : 9. includes/database_tables.php Before: ?> Add: //kgt - discount coupons define('TABLE_DISCOUNT_COUPONS', 'discount_coupons'); define('TABLE_DISCOUNT_COUPONS_TO_ORDERS', 'discount_coupons_to_orders'); define('TABLE_DISCOUNT_COUPONS_TO_CATEGORIES', 'discount_coupons_to_categories'); define('TABLE_DISCOUNT_COUPONS_TO_PRODUCTS', 'discount_coupons_to_products'); define('TABLE_DISCOUNT_COUPONS_TO_MANUFACTURERS', 'discount_coupons_to_manufacturers'); define('TABLE_DISCOUNT_COUPONS_TO_CUSTOMERS', 'discount_coupons_to_customers'); define('TABLE_DISCOUNT_COUPONS_TO_ZONES', 'discount_coupons_to_zones'); //end kgt - discount coupons please Steve, can you export the corresponding table then i can insert it in my database ? thank you :thumbsup: Quote /// Link to comment Share on other sites More sharing options...
cherubrock74 Posted May 13, 2010 Share Posted May 13, 2010 Hi Steve when reading from installation instructions of the latest version of one page checkout, on the paypal standard php file it says to add /* One Page Checkout - BEGIN */ global $onePageCheckout; /* One Page Checkout - END */ after global $cart When I looked into my paypal_standard.php file I have 3 occurrences of global $cart How should I really proceed? Add the one page checkout code after all the 3 occurrences of global $cart? Is it right? Or I have a different paypal_standard.php file? If so where should I get the correct one? Please advise thank you Here is the code where global $cart occurs in my paypal standard: global $cartID, $cart_PayPal_Standard_ID, $customer_id, $languages_id, $order, $order_total_modules; global $cart_PayPal_Standard_ID; global $cartID, $cart; Quote Link to comment Share on other sites More sharing options...
danrimer Posted May 13, 2010 Share Posted May 13, 2010 Thanks for this cool looking checkout page. I have installed it on my test shop and have had a couple of problems: I have a feeling someone else has asked this question, but I can't seem to find it (or the answer). I find that when I have "require login" set to "false", the customer cannot see or change the shipping method. I have tried removing all but one method (ie all my custom methods) and it still doesn't work. Does anyone know why or how to fix it? Another problem is the loss of focus between refreshes - when you are filling in various fields, the (optional) "updating..." dialogue causes the cursor to sometimes move to another input box! Very annoying! Is there a way of changing WHEN the page gets updated? For instance, when changing a quantity from 10 to 12 the system will update at 10,1 and then 12!!! Thanks Dan Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 13, 2010 Share Posted May 13, 2010 Hi Steve when reading from installation instructions of the latest version of one page checkout, on the paypal standard php file it says to add /* One Page Checkout - BEGIN */ global $onePageCheckout; /* One Page Checkout - END */ after global $cart When I looked into my paypal_standard.php file I have 3 occurrences of global $cart How should I really proceed? Add the one page checkout code after all the 3 occurrences of global $cart? Is it right? Or I have a different paypal_standard.php file? If so where should I get the correct one? Please advise thank you Here is the code where global $cart occurs in my paypal standard: global $cartID, $cart_PayPal_Standard_ID, $customer_id, $languages_id, $order, $order_total_modules; global $cart_PayPal_Standard_ID; global $cartID, $cart; Hi If you look in one page checkout contribution in includes/modules/payments you will find the file with updates alreasy done simply upload it Steve Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 13, 2010 Share Posted May 13, 2010 Thanks for this cool looking checkout page. I have installed it on my test shop and have had a couple of problems: I have a feeling someone else has asked this question, but I can't seem to find it (or the answer). I find that when I have "require login" set to "false", the customer cannot see or change the shipping method. I have tried removing all but one method (ie all my custom methods) and it still doesn't work. Does anyone know why or how to fix it? Another problem is the loss of focus between refreshes - when you are filling in various fields, the (optional) "updating..." dialogue causes the cursor to sometimes move to another input box! Very annoying! Is there a way of changing WHEN the page gets updated? For instance, when changing a quantity from 10 to 12 the system will update at 10,1 and then 12!!! Thanks Dan Hi Dan, See if their demo site has these problems if so report using email for bug reporting in install guide Steve Quote Link to comment Share on other sites More sharing options...
cherubrock74 Posted May 14, 2010 Share Posted May 14, 2010 Hi Steve I installed the latest version of one page checkout I do not get any error, but when I checkout, even if Imy billing address is already there, no payment method is showing up, and the form still says "Please fill in your billing address for payment options". I am trying to use paypal standard with my sandbox. If I proceed with the checkout and click the confirm order button, I get to the processing page and instead of presenting me the paypal login page, I am redirected straight to checkout_success.php and it says "thank you for your order".(Basically you order the product for free! :)) It seems like the checkout is not picking my paypal standard module... Can you suggest anything? Dont know if it makes a difference, but when I configured my sandbox data in the paypal standard module, I did not input any private key, public certificate, paypal public certificate and paypal public certificate ID. I dont know where to get these data for my sandbox. I have my API credentials for the sandbox, but they include username, password and signature. I believe they are used in paypal express? Quote Link to comment Share on other sites More sharing options...
crester Posted May 14, 2010 Share Posted May 14, 2010 Hello. a wried problem. I have never observed it til today. when the user is logged in, checkout page is constantly "checking delivery address, checking shipment method, checking shipment address... and so on" as in a loop, and it never breaks. Do somebody experience the problem? Thank you Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 15, 2010 Share Posted May 15, 2010 Hello. a wried problem. I have never observed it til today. when the user is logged in, checkout page is constantly "checking delivery address, checking shipment method, checking shipment address... and so on" as in a loop, and it never breaks. Do somebody experience the problem? Thank you Hi Test if theis does the same on their demo if so report it as bug using email in install guide Steve Quote Link to comment Share on other sites More sharing options...
steve_s Posted May 15, 2010 Share Posted May 15, 2010 Hi Steve I installed the latest version of one page checkout I do not get any error, but when I checkout, even if Imy billing address is already there, no payment method is showing up, and the form still says "Please fill in your billing address for payment options". I am trying to use paypal standard with my sandbox. If I proceed with the checkout and click the confirm order button, I get to the processing page and instead of presenting me the paypal login page, I am redirected straight to checkout_success.php and it says "thank you for your order".(Basically you order the product for free! :)) It seems like the checkout is not picking my paypal standard module... Can you suggest anything? Dont know if it makes a difference, but when I configured my sandbox data in the paypal standard module, I did not input any private key, public certificate, paypal public certificate and paypal public certificate ID. I dont know where to get these data for my sandbox. I have my API credentials for the sandbox, but they include username, password and signature. I believe they are used in paypal express? Hi I found to use sand box you needed 2 logins, one as a developer login sandbox then another account as a customer Are you using the payment mod from one page checkout for paypal standard? Steve Quote Link to comment Share on other sites More sharing options...
cherubrock74 Posted May 15, 2010 Share Posted May 15, 2010 Hi I found to use sand box you needed 2 logins, one as a developer login sandbox then another account as a customer Are you using the payment mod from one page checkout for paypal standard? Steve Hi Steve, thanks for the reply. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.