♥raiwa Posted September 11, 2017 Share Posted September 11, 2017 DONE Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 11, 2017 Author Share Posted September 11, 2017 Thanks. You got the bug fixes too I see. How did you do that? You can take over changes that I made without me starting a pull request? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 11, 2017 Share Posted September 11, 2017 it seems the bug fixes were included in the pull request Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 11, 2017 Author Share Posted September 11, 2017 Now I am more confused. Because I only started a pull request for the install manual changes But it looks like the bug fixes were added too? Well as long you got them all is good I guess. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 11, 2017 Author Share Posted September 11, 2017 (edited) Well I call it a night. I am gonna go grab a beer or two and watch some TV series for the rest of the evening/night. Have a good one guys. Edited September 11, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 11, 2017 Share Posted September 11, 2017 3 minutes ago, Tsimi said: Well I call it a night. I am gonna go grab a beer or two and watch some TV series for the rest of the evening/night. Have a good one guys. Lucky you, it's not even 2pm here I'm still stuck at my day job. Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 11, 2017 Share Posted September 11, 2017 2 hours ago, Tsimi said: Yep, you're right it does work if you tick the new expire date checkbox. Well done. Code will be added to github. You sure are more skilled then you like to admit. 2 bugs down 1 last one to go for now. @Tsimi on the last bug are you seeing an error? If so can you screen print it and send to me? Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 11, 2017 Share Posted September 11, 2017 (edited) 55 minutes ago, LeeFoster said: @Tsimi on the last bug are you seeing an error? If so can you screen print it and send to me? Never mind I found a fix. This ##### BOF POINTS REWARDS BS ####### if ((MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') && (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_REDEEM_SYSTEM == 'True')) { if (isset($_POST['customer_shopping_points_spending']) && is_numeric($_POST['customer_shopping_points_spending']) && ($_POST['customer_shopping_points_spending'] > 0)) { $customer_shopping_points_spending = false; // This if sentence should include check for amount of points on account compared to the transferred point from checkout_payment.php // Possible Hack Fix included if (tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']) < $order->info['total'] && !is_object($$payment) || (tep_get_shopping_points($customer_id) < $_POST['customer_shopping_points_spending'])) { $customer_shopping_points_spending = false; tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); } else { $customer_shopping_points_spending = $_POST['customer_shopping_points_spending']; if (!tep_session_is_registered('customer_shopping_points_spending')) tep_session_register('customer_shopping_points_spending'); } } //To ensure only the first order of a new customer is entitled to grant point to his/her referrer. Otherwise, a hacker might hard-code the email address of a referrer and cheat for point on every single order the new customer made. if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) { if (isset($_POST['customer_referred']) && tep_not_null($_POST['customer_referred'])) { $customer_referral = false; $check_mail = trim($_POST['customer_referred']); if (tep_validate_email($check_mail) == false) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_NOT_VALID), 'SSL')); } else { $valid_referral_query = tep_db_query("select customers_id from customers where customers_email_address = '" . $check_mail . "' limit 1"); $valid_referral = tep_db_fetch_array($valid_referral_query); if (!tep_db_num_rows($valid_referral_query)) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_NOT_FOUND), 'SSL')); } if ($check_mail == $order->customer['email_address']) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_SELF), 'SSL')); } else { $customer_referral = $valid_referral['customers_id']; if (!tep_session_is_registered('customer_referral')) tep_session_register('customer_referral'); } } } } } if ( ($payment_modules->selected_module != $payment) || ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } ######## EOF POINTS REWARDS BS #################*/ Should be this. ##### BOF POINTS REWARDS BS ####### if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { if (isset($_POST['customer_shopping_points_spending']) && is_numeric($_POST['customer_shopping_points_spending']) && ($_POST['customer_shopping_points_spending'] > 0)) { $customer_shopping_points_spending = false; // This if sentence should include check for amount of points on account compared to the transferred point from checkout_payment.php // Possible Hack Fix included if (tep_calc_shopping_pvalue($_POST['customer_shopping_points_spending']) < $order->info['total'] && !is_object($$payment) || (tep_get_shopping_points($customer_id) < $_POST['customer_shopping_points_spending'])) { $customer_shopping_points_spending = false; tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REDEEM_SYSTEM_ERROR_POINTS_NOT), 'SSL')); } else { $customer_shopping_points_spending = $_POST['customer_shopping_points_spending']; if (!tep_session_is_registered('customer_shopping_points_spending')) tep_session_register('customer_shopping_points_spending'); } } //To ensure only the first order of a new customer is entitled to grant point to his/her referrer. Otherwise, a hacker might hard-code the email address of a referrer and cheat for point on every single order the new customer made. if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) { if (isset($_POST['customer_referred']) && tep_not_null($_POST['customer_referred'])) { $customer_referral = false; $check_mail = trim($_POST['customer_referred']); if (tep_validate_email($check_mail) == false) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_NOT_VALID), 'SSL')); } else { $valid_referral_query = tep_db_query("select customers_id from customers where customers_email_address = '" . $check_mail . "' limit 1"); $valid_referral = tep_db_fetch_array($valid_referral_query); if (!tep_db_num_rows($valid_referral_query)) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_NOT_FOUND), 'SSL')); } if ($check_mail == $order->customer['email_address']) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(REFERRAL_ERROR_SELF), 'SSL')); } else { $customer_referral = $valid_referral['customers_id']; if (!tep_session_is_registered('customer_referral')) tep_session_register('customer_referral'); } } } } } if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) && (!$customer_shopping_points_spending) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link('checkout_payment.php', 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } ######## EOF POINTS REWARDS BS #################*/ And in checkout_payment.php Find if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment), 'required aria-required="true"'); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } Replace with if (sizeof($selection) > 1) { echo tep_draw_radio_field('payment', $selection[$i]['id'], ($selection[$i]['id'] == $payment), 'aria-required="true"'); } else { echo tep_draw_hidden_field('payment', $selection[$i]['id']); } Something similar may also need to be done for any other 'checkout_*.php' pages. Edited September 11, 2017 by LeeFoster raiwa and Tsimi 2 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 11, 2017 Author Share Posted September 11, 2017 (edited) @LeeFoster I'll test this as soon I get back from work today. Thanks. Edited September 11, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 I had an issue with showing the points description on the product info page as I'm using Kymation's modular page so I created a module to show this. reward points description for modular product page.rar Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 12, 2017 Share Posted September 12, 2017 Hello Lee @LeeFoster, Great, but I get an error when trying to uncompress your rar. Can you please check and reload. I'll then include it to the package as an optional module. Thanks and kind regards Rainer Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 @raiwa Try this one reward point desc Modular product page.zip Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 12, 2017 Share Posted September 12, 2017 @LeeFoster, thats ok, thanks. Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) @raiwa I'm gonna test the last bug fix from @LeeFoster now and then I would like to have a go at the shopping cart box module if that's OK with you, I think step 17? I am sure in the history of osC people have talked about it but I can't recall any good info about it. Why do we separate the language files? Why not put all into english.php? Is it a loading speed thing? That would reduce the last 3-4 steps into 1 same for the admin change from 2 steps to 1 step. Edited September 12, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 @raiwa & @Tsimi I'm not sure I'm going to be able to help much now until you guys have done compiling it in to a new addon. Once that's done let me know and I'll be on hand for testing and bug fixes. Tsimi 1 Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) 3 minutes ago, LeeFoster said: @raiwa & @Tsimi I'm not sure I'm going to be able to help much now until you guys have done compiling it in to a new addon. Once that's done let me know and I'll be on hand for testing and bug fixes. Roger that will do. Many thanks again for your interest in this addon and for your help on fixing those bugs, well done. Edited September 12, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 4 minutes ago, Tsimi said: Roger that will do. Many thanks again for your interest in this addon and for your help on fixing those bugs, well done. Happy to help, makes my day job much less boring. Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) @LeeFoster That last bug fix doesn't work for me. I changed the code in checkout_confirmation.php and checkout_payment.php is that correct? @raiwa What should we name the new shopping cart box module? Current one is bm_shopping_cart.php Edited September 12, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 2 minutes ago, Tsimi said: @LeeFoster That last bug fix doesn't work for me. I changed the code in checkout_confirmation.php and checkout_payment.php is that correct? Yeah that's right. What error/issue are you seeing? Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) No error message at all. Just getting the usual "please select a payment method" message And it doesn't deduct the points in the checkout_confirmation.php page. Edited September 12, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 5 minutes ago, Tsimi said: No error message at all. Just getting the usual "please select a payment method" message And it doesn't deduct the points in the checkout_confirmation.php page. Can you screen shot it for me? Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) Yes sure, here This is how I see the payment page at first. No payment method is checked and I have ticked the checkbox below to use points Then when I click on the continue button I get the typical osC error message And here the checkout confirmation page, as you can see the points aren't getting deducted. Edited September 12, 2017 by Tsimi Quote Link to comment Share on other sites More sharing options...
LeeFoster Posted September 12, 2017 Share Posted September 12, 2017 (edited) Can you try un-checking the box and re-checking it to see if that resolves the issue? If not can you send me your code for checkout confirmation? Ironically I'm using the same product for my testing. Edited September 12, 2017 by LeeFoster Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted September 12, 2017 Share Posted September 12, 2017 1 hour ago, Tsimi said: I am sure in the history of osC people have talked about it but I can't recall any good info about it. Why do we separate the language files? Why not put all into english.php? Is it a loading speed thing? That would reduce the last 3-4 steps into 1 same for the admin change from 2 steps to 1 step. No need to touch this now, my goal is to move all language definitions to the new contribution language files (ht, hook, content/box modules). So in the final version there shouldn't be any language definitions left for to add to core language files. Tsimi 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
♥Tsimi Posted September 12, 2017 Author Share Posted September 12, 2017 (edited) 9 minutes ago, LeeFoster said: Can you try un-checking the box and re-checking it to see if that resolves the issue? If not can you send me your code for checkout confirmation? No change, issue persists. Here my current checkout confirmation file https://pastebin.com/1EykAeLq This Points and Rewards addon was build on the old version of osC and I have this installed into such an old osC test shop which I used as guideline to convert it to BS. As you can see in the following screenshots the payment method is selected/ticked from the beginning and below I ticked the use points checkbox. As you can see it automatically changes the payment method to "Points" in the checkout confirmation page. Edited September 12, 2017 by Tsimi 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.