Jump to content

LeeFoster

Members
  • Content count

    1,562
  • Joined

  • Last visited

  • Days Won

    11

Reputation Activity

  1. Like
    LeeFoster got a reaction from burt in Only Show Boxes on Selected Pages   
    That's exactly what I was looking for.
  2. Like
    LeeFoster got a reaction from Tsimi in Custom Product Builder of OSc BS   
    You're right,  it appears to be an issue with my product. 
    Note to self - 'Don't use " in product description'
    The other error I have fixed, there is an instance of cpb_product_builder_name that is missing ' ' around it.
  3. Like
    LeeFoster got a reaction from Tsimi in Converting Points and Rewards system for osC BS   
    I'll pick this up over the weekend.
  4. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    Works for me now
  5. Like
    LeeFoster got a reaction from Tsimi in Converting Points and Rewards system for osC BS   
    Ignore my errors this was due to me testing the review module but not making a review.
    I've made the review module that is included work too. I'll post the update shortly.
  6. Like
    LeeFoster got a reaction from Tsimi in Converting Points and Rewards system for osC BS   
    Ignore my errors this was due to me testing the review module but not making a review.
    I've made the review module that is included work too. I'll post the update shortly.
  7. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    I can take a look later yeah
  8. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    Seems to work OK for me.
  9. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    This would be the preferred option, I considered doing it but I don't know enough about how to do it. 
  10. Like
    LeeFoster got a reaction from Tsimi in Converting Points and Rewards system for osC BS   
    Yeah, I think that was all the known ones. I'll do some testing and see if anything else comes up.
  11. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    Bug 4 
    In my_points.php
    Find
    <div class="row"> <div class="col-md-6 pagenumber"><?php echo $pending_points_split->display_count(TEXT_DISPLAY_NUMBER_OF_RECORDS); ?></div> <div class="col-md-6"><span class="pull-right pagenav"><ul class="pagination"><?php echo $pending_points_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></ul></span><span class="pull-right"><?php echo TEXT_RESULT_PAGE; ?></span></div> </div> <?php } else { ?> Replace with
    <?php if ($pending_points_split->number_of_rows > 0) { ?> <div class="row"> <div class="col-md-6 pagenumber"><?php echo $pending_points_split->display_count(TEXT_DISPLAY_NUMBER_OF_RECORDS); ?></div> <div class="col-md-6"><span class="pull-right pagenav"><ul class="pagination"><?php echo $pending_points_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?></ul></span><span class="pull-right"><?php echo TEXT_RESULT_PAGE; ?></span></div> </div> <?php } } else { ?> That should fix it.
  12. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    In redemptions.php 
    Find
    if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_AUTO_EXPIRES)) { $points_query = tep_db_query("select customers_shopping_points from customers where customers_id = '" . (int)$id . "' and customers_points_expires > CURDATE() limit 1"); } else { $points_query = tep_db_query("select customers_shopping_points from customers where customers_id = '" . (int)$id . "' limit 1"); } $points = tep_db_fetch_array($points_query); return $points['customers_shopping_points']; } Replace with
    if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_POINTS_AUTO_EXPIRES)) { $points_query = tep_db_query("select customers_shopping_points from customers where customers_id = '" . (int)$id . "' and customers_points_expires > CURDATE() OR customers_points_expires is null limit 1"); } else { $points_query = tep_db_query("select customers_shopping_points from customers where customers_id = '" . (int)$id . "' limit 1"); } $points = tep_db_fetch_array($points_query); return $points['customers_shopping_points']; } Fixing this allowed me to replicate Bug 4 so I'll work on that now.
  13. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    In a moment of madness I managed to delete my entire includes folder so restoring a back up and then updating my files.
  14. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    In a moment of madness I managed to delete my entire includes folder so restoring a back up and then updating my files.
  15. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    @Tsimi
    Change 
    var submitter = null; to 
    var submitter = 0;  
  16. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    @Tsimi
    I also noticed that you have 
    <?php if ((MODULE_HEADER_TAGS_POINTS_REWARDS_USE_POINTS_SYSTEM == 'True') && (MODULE_HEADER_TAGS_POINTS_REWARDS_USE_REDEEM_SYSTEM == 'True')) { //echo points_selection(); $cart_show_total= $cart->show_total(); echo points_selection($cart_show_total); if (tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) { echo referral_input(); } } ?> Where as I have
    <?php if ((USE_POINTS_SYSTEM == 'true') && (USE_REDEEM_SYSTEM == 'true')) { //echo points_selection(); $cart_show_total= $cart->show_total(); echo points_selection($cart_show_total); if (tep_not_null(USE_REFERRAL_SYSTEM) && (tep_count_customer_orders() == 0)) { echo referral_input(); } } ?>  
  17. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    I'm not sure I understand what you mean.
    As far as I am aware having none checked is standard OSCommerce functionality and I wouldn't know how to make one selected by default. I don't think I'd want to have one selected by default
  18. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    @Tsimi
    I just read your amendments. I think the way it currently works is the correct way to do it, otherwise you are forcing the customer to spend their points when they may not want to. They may be saving them for a bigger item.
  19. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    Oh, I've done that already for mine.
     
    updated footer links.zip
  20. Like
    LeeFoster got a reaction from Tsimi in Converting Points and Rewards system for osC BS   
    @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.
  21. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    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.
  22. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    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.
  23. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    I'm OK at fixing other people's code but useless at writing my own. 
    I'm looking at the last bug now, it looks like the java script isn't being triggered. 
  24. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    I'm OK at fixing other people's code but useless at writing my own. 
    I'm looking at the last bug now, it looks like the java script isn't being triggered. 
  25. Like
    LeeFoster got a reaction from raiwa in Converting Points and Rewards system for osC BS   
    I have managed to find a fix to bug 3.
    In admin/customers_points.php
    Find 
    if ($pointstodel > 0) { if (isset($_POST['set_exp']) && ($_POST['set_exp'] == 'on') && ($balance > 0)) { $expire = date('Y-m-d', strtotime('+ '. POINTS_AUTO_EXPIRES .' month')); $expire_date = "\n" . sprintf(EMAIL_TEXT_EXPIRE, tep_date_short($expire)); tep_db_query("update customers set customers_shopping_points = customers_shopping_points - '". $pointstodel ."', customers_points_expires = '". $expire ."' where customers_id = '". (int)$customers_id ."'"); } else { $exp = ($balance > 0) ? $Cexpire_date : 'null'; tep_db_query("update customers set customers_shopping_points = customers_shopping_points - '". $pointstodel ."' where customers_id = '". (int)$customers_id ."'"); $expire_date = "\n" . sprintf(EMAIL_TEXT_EXPIRE, tep_date_short($_POST['customers_points_expires'])); } Replace with
    if ($pointstodel > 0) { if (isset($_POST['set_exp']) && ($_POST['set_exp'] == 'on') && ($balance > 0)) { $expire = date('Y-m-d', strtotime('+ '. POINTS_AUTO_EXPIRES .' month')); $expire_date = "\n" . sprintf(EMAIL_TEXT_EXPIRE, tep_date_short($expire)); tep_db_query("update customers set customers_shopping_points = customers_shopping_points - '". $pointstodel ."', customers_points_expires = '". $expire ."' where customers_id = '". (int)$customers_id ."'"); } else if (isset($_POST['set_exp']) && ($_POST['set_exp'] == 'on') && ($balance == '0')) { $expire = null; $expire_date = "\n" . sprintf(EMAIL_TEXT_EXPIRE, tep_date_short($expire)); tep_db_query("update customers set customers_shopping_points = customers_shopping_points - '". $pointstodel ."', customers_points_expires = '". $expire ."' where customers_id = '". (int)$customers_id ."'"); } else { $exp = ($balance > 0) ? $Cexpire_date : 'null'; tep_db_query("update customers set customers_shopping_points = customers_shopping_points - '". $pointstodel ."' where customers_id = '". (int)$customers_id ."'"); $expire_date = "\n" . sprintf(EMAIL_TEXT_EXPIRE, tep_date_short($_POST['customers_points_expires'])); }  
×