♥raiwa Posted June 12, 2018 Share Posted June 12, 2018 If I understand correct, you wants the island surcharge to be excluded from being paid by points. THis would require some extra custom coding. 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...
YePix Posted June 12, 2018 Share Posted June 12, 2018 in contrast, I want that the island surcharge is also paid with points Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted June 12, 2018 Share Posted June 12, 2018 I'm talking now by memory, but can you try to change sort order so the redemtions ot module is last before order total. I mean that it shows below your extra fee module. I'll see if I can have a deeper look tomorrow. 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...
YePix Posted June 12, 2018 Share Posted June 12, 2018 Unfortunately does not work. could it be that the module is loaded directly from the order_total directory? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted June 13, 2018 Share Posted June 13, 2018 Hello Peter @Yepi, I believe you mean this case when there are enough points to cover all order cost and it doesn't apply points on the extra charge: Sub-Total: $69.99 Flat Rate (): $5.00 Inselzuschlag: $5.00 Points Redeemed: -$74.99 Total: $5.00 For this you would need to add coding for the ot _module in: includes/functions/redemptions.php within the "calculate_max_points" function: $path_points = ($order->products[$i]['price']*$order->products[$i]['qty'])+($order->info['shipping_cost']+$order->info['tax']); You'll need to add the extra charge similar how it is done with the shipping cost. I do not know and use this extra charge module, so I can't help with more details, sorry. On the other hand, do you really think that you'll have real orders which use points to cover ALL order cost?? 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...
YePix Posted June 13, 2018 Share Posted June 13, 2018 Hello Reiner, that's exactly what it's about. I looked at the file and this function already exists. I can not say how the additional costs can be paid with points so that the bill is at 0.00 if ( tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_RESTRICTION_PATH) && !tep_not_null(MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_RESTRICTION_PID) ) { $path_points = 0; for ($i=0; $i<sizeof($order->products); $i++) { $cat_ids = explode("[,]", MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_RESTRICTION_PATH); $sub_cat_ids = explode("[_]", tep_get_product_path($order->products[$i]['id'])); for ($iii = 0; $iii < count($sub_cat_ids); $iii++) { for ($ii = 0; $ii < count($cat_ids); $ii++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { $path_points = ($order->products[$i]['price']*$order->products[$i]['qty'])+($order->info['shipping_cost']+$order->info['tax']); $max_points = $path_points/MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_REDEEM_POINT_VALUE; } } } } } Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted June 13, 2018 Share Posted June 13, 2018 (edited) You could try the following: in ot_inselfee.php session register the variable with the extra charge and add it to globals list: function process() { global $order, $currencies, $cart, $inselfee; ...................... tep_session_register('inselfee'); $this->output[] = array('title' => $this->title . ':', If you need to add tax, use another variable name and add tax. Then in includes/functions/redemptions.php do this: function calculate_max_points($customer_shopping_points) { global $currencies, $order, $inselfee; $max_points = ($order->info['total']+$inselfee)/MODULE_HEADER_TAGS_POINTS_REWARDS_POINTS_REDEEM_POINT_VALUE; You could code it a bit cleaner checking for tep_not_null($inselfee) and if (!tep_session_is_registered('inselfee')) {, but it should work. For my example I get this: Sub-Total: $69.99 Flat Rate (): $5.00 Inselzuschlag: $5.00 Points Redeemed: -$79.99 Total: $0.0 Edited June 13, 2018 by raiwa 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...
♥raiwa Posted June 13, 2018 Share Posted June 13, 2018 (edited) You probably need also the ship in cart add on: https://apps.oscommerce.com/YLYGm&ship-in-cart-bs-reloaded or some additional code loading the ot modules already on the checkout payment page. Edited June 13, 2018 by raiwa YePix 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...
YePix Posted June 13, 2018 Share Posted June 13, 2018 Thank you very much Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted October 5, 2018 Author Share Posted October 5, 2018 (edited) @raiwa Have you looked at this add-on with PHP 7.2 recently? I get these errors and I know why it happens but I could not find a fix for it. customers_points_referral.php file PHP 5.6 and 7.1 Warning: Invalid argument supplied for foreach() in /home/xxx/www/shop/xxx/includes/classes/object_info.php on line 21 PHP 7.2 Warning: Invalid argument supplied for foreach() in /home/xxx/www/shop/xxx/includes/classes/object_info.php on line 21 Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/xxx/www/shop/xxx/customers_points_referral.php on line 451 All the other points related pages work just fine even with PHP 7.2 Edited October 5, 2018 by Tsimi Quote Link to comment Share on other sites More sharing options...
Omar_one Posted October 6, 2018 Share Posted October 6, 2018 Hello @Tsimi and any one have the same issue for this Warning: sizeof(): Parameter must be an array or an object that implements Countable in /home/xxx/www/shop/xxx/customers_points_referral.php on line 451 change this in customers_points_referral.php on line 451 if (sizeof($reviews) > 0) to if (is_array($reviews) && sizeof($reviews) > 0) BR Omar Tsimi 1 Quote Get the latest Responsive osCommerce CE (community edition) here . Link to comment Share on other sites More sharing options...
♥raiwa Posted October 6, 2018 Share Posted October 6, 2018 @Tsimi, I had read your question and forgot to reply. I was very busy today. I believe @Omar_one's fix is correct, thanks. rgds Rainer 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 October 6, 2018 Author Share Posted October 6, 2018 Thanks @Omar_one That took care of one of the errors. Now only one error is left Warning: Invalid argument supplied for foreach() in /home/xxx/www/shop/xxx/includes/classes/object_info.php on line 21 Must have something to do with this code here I guess (around line 455) if ((!isset($_GET['uID']) || (isset($_GET['uID']) && ($_GET['uID'] == $pending_points['unique_id']))) && !isset($uInfo)) { $uInfo = new objectInfo($uInfo_array); } I tried to copy code structures from other file which also have the objectInfo code in it but none of my tries worked thus far. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted October 7, 2018 Share Posted October 7, 2018 @Tsimi I couldn't recreate this error, but try this: if ( is_array($uInfo_array) && (!isset($_GET['uID']) || (isset($_GET['uID']) && ($_GET['uID'] == $pending_points['unique_id']))) && !isset($uInfo) ) { $uInfo = new objectInfo($uInfo_array); } or this: if ( isset($uInfo_array) && (!isset($_GET['uID']) || (isset($_GET['uID']) && ($_GET['uID'] == $pending_points['unique_id']))) && !isset($uInfo) ) { $uInfo = new objectInfo($uInfo_array); } 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 October 7, 2018 Author Share Posted October 7, 2018 Thanks @raiwa The error has been corrected I think. I had something mixed up with the data inside the database and the data shown in the shop. I emptied the database table and now the error is gone and I cannot recreate it either. 🤔 So the only code that needs fixing to be PHP 7.2 compatible is the code fix Omar posted above. Thanks again for looking into it. raiwa 1 Quote Link to comment Share on other sites More sharing options...
tttim6575 Posted February 19, 2019 Share Posted February 19, 2019 (edited) will this work with osCommerce Online Merchant v2.3.4.1 Edited February 19, 2019 by tttim6575 Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted February 19, 2019 Share Posted February 19, 2019 Hello @tttim6575, It will work with 2.3.4.1 CE FROZEN and pre FROZEN EDGE version based on BS3. It will not work out of the box with 2.3.4.1 EDGE based on BS4. You would need to update the html output to BS4. It is not intended to be used with 2.3.4.1. standard. There are older versions available for this. 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...
tttim6575 Posted February 19, 2019 Share Posted February 19, 2019 bummer to late my shop is live Quote Link to comment Share on other sites More sharing options...
tttim6575 Posted February 19, 2019 Share Posted February 19, 2019 so then why isit in the all versions category? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted February 19, 2019 Share Posted February 19, 2019 47 minutes ago, tttim6575 said: so then why isit in the all versions category? Sorry, I do not understand. What do you mean by "all versions category"? The add-on title says that it is for BS (Bootstrap). 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...
winfm Posted February 28, 2019 Share Posted February 28, 2019 Hi, When my store has multiple currencies (USD and EUR) the calculation of order total is correct for default (USD). Order total in EUR is incorrect. This addon v2.0.1 installed on 2.3.4.1 BS CE Frozen. Set default USD as 1.0 and EUR as 0.5 See screen grab below. Any help is much appreciated. Quote Link to comment Share on other sites More sharing options...
tttim6575 Posted March 9, 2019 Share Posted March 9, 2019 so does this work with 2.3.4.1 ? or is there anything like this out there that will work? Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted March 9, 2019 Share Posted March 9, 2019 On 2/19/2019 at 10:28 AM, raiwa said: Hello @tttim6575, It will work with 2.3.4.1 CE FROZEN and pre FROZEN EDGE version based on BS3. It will not work out of the box with 2.3.4.1 EDGE based on BS4. You would need to update the html output to BS4. It is not intended to be used with 2.3.4.1. standard. There are older versions available for this. @tttim6575 you got the answer already. Please search in the Apps Marketplace for the old version. 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...
♥raiwa Posted March 9, 2019 Share Posted March 9, 2019 Hello @winfm, Sorry for the late reply. I was very busy and then forgot for your post. I checked and yes, you are right. I could reproduce the error. Please change in includes/modules/order_total/ot_redemptions.php line 61 to: $order->info['total'] = $currencies->format_raw($order->info['total'], false) - $currencies->format_raw(tep_calc_shopping_pvalue($customer_shopping_points_spending), false); Please confirm and I'll upload the update with this fix. Thanks for reporting it! Best 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...
winfm Posted March 10, 2019 Share Posted March 10, 2019 @raiwa, Now working fine with multi currencies store. Thanks very much. 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.