Guest Posted September 21, 2015 Share Posted September 21, 2015 Hi there, I've got this strange problem: the giftwrap module is working fine, but it calculates the fee twice. So when I have a 0,50 fee, it counts 1,- fee. does anyone know what could be causing the problem? Link to comment Share on other sites More sharing options...
Guest Posted December 1, 2015 Share Posted December 1, 2015 @@Tsimi Hi Lambros Just a thought, maybe not possible. But with gift wrapping how about adding like per item say 2.50 per item cart conatians say 10 items, total wrapping cost would be 22.50. We got caught the customer had about 21 items, all to be gift wrapped with the current "system" the cost was 2.50 ( for about 1 1/2 hours work, not the best hourly rate) Just a thought. Cheers Grandpa Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 2, 2015 Author Share Posted December 2, 2015 @@grandpaj Hi John 21 items! You sold 21 items!? Congratulations! :thumbsup: I haven't looked at the gift wrapping module in a while let me go refresh my memory by playing around with it and I report back. Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 2, 2015 Author Share Posted December 2, 2015 @@grandpaj Hi John I think we have a solution for your problem. Harald was in the chat and helped me out with this. The theory was clear to me but I couldn't figure out how to look for items in the cart but we got it at the end and here is the code. Just backup your old gift wrap module file, uninstall your current gift wrap module. Then copy&paste the code from the below link. Then install again the module. Now you should be able to switch between Flat Rate (default setting) and Per Item. Please try it out and if all is good I will upload it to the Addons area. Gift wrap Module Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2015 Share Posted December 2, 2015 @@Tsimi Hi Lambros. B R I L L I A N T works like a charm. Many thanks, Im sure others will find this a usful addon. Kind regards Grandpa Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 2, 2015 Author Share Posted December 2, 2015 @@grandpaj :thumbsup: Great, thanks for the feedback. I'll upload it to the Addons area then. Around this time of year it might be useful to some out there. Thanks again. Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 2, 2015 Author Share Posted December 2, 2015 @@grandpaj Here some additional changes regarding the message text in the checkout_shipping.php page. Replace your language definitions with these here. // BOF GIFTWRAP define('TEXT_GIFTWRAP', 'Gift Wrapping Service'); define('TEXT_HAVE_YOUR_ORDER_GIFT_WRAPPED', 'Have your products giftwrapped.'); define('TEXT_GIFTWRAP_FEE_FLAT_RATE', 'An additional fee of %s will be added to your order.'); define('TEXT_GIFTWRAP_FEE_PER_ITEM', 'An additional fee of %s <u>per item</u> will be added to your order.'); // EOF GIFTWRAP then open your checkout_shipping.php FIND <!-- BOF GIFTWRAP //--> <?php if (MODULE_ORDER_TOTAL_ALLOW_GIFTWRAP == 'true') { ?> <div class="col-sm-6 col-xs-12 pull-right alert alert-success"> <?php $gift_price = $currencies->display_price(MODULE_ORDER_TOTAL_GIFTWRAP_FEE, tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id'])); echo '<i class="fa fa-gift fa-2x"> </i><strong>' . TEXT_GIFTWRAP . '</strong><br>' . TEXT_HAVE_YOUR_ORDER_GIFT_WRAPPED; echo '<div style="float:right;">' . tep_draw_checkbox_field('gift_wrap', '1', false) . '</div>'; if (MODULE_ORDER_TOTAL_GIFTWRAP_FEE > 0) echo '<br /><small>' . sprintf(TEXT_GIFTWRAP_FEE, $gift_price) . '</small>'; ?> </div> <div class="clearfix"></div> <?php } ?> <!-- EOF GIFTWRAP //--> REPLACE WITH <!-- BOF GIFTWRAP //--> <?php if (MODULE_ORDER_TOTAL_ALLOW_GIFTWRAP == 'true') { ?> <div class="col-sm-6 col-xs-12 pull-right alert alert-success"> <?php $gift_price = $currencies->display_price(MODULE_ORDER_TOTAL_GIFTWRAP_FEE, tep_get_tax_rate(MODULE_ORDER_TOTAL_GIFTWRAP_TAX_CLASS, $order->delivery['country']['id'], $order->delivery['zone_id'])); echo '<i class="fa fa-gift fa-2x"> </i><strong>' . TEXT_GIFTWRAP . '</strong><br>' . TEXT_HAVE_YOUR_ORDER_GIFT_WRAPPED; echo '<div style="float:right;">' . tep_draw_checkbox_field('gift_wrap', '1', false) . '</div>'; if (MODULE_ORDER_TOTAL_GIFTWRAP_FEE > 0) { if (MODULE_ORDER_TOTAL_PER_ITEM_GIFTWRAP == 'Flat Rate') { echo '<br /><small>' . sprintf(TEXT_GIFTWRAP_FEE_FLAT_RATE, $gift_price) . '</small>'; } else { echo '<br /><small>' . sprintf(TEXT_GIFTWRAP_FEE_PER_ITEM, $gift_price) . '</small>'; } } ?> </div> <div class="clearfix"></div> <?php } ?> <!-- EOF GIFTWRAP //--> That will switch the messages for Per Item and Flat Rate. Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 2, 2015 Author Share Posted December 2, 2015 Gift Wrapping Module v1.1 http://addons.oscommerce.com/info/9311 Change Log:- Service Fee "Per Item" or "Flat Rate" can be charged.- Updated Install Manual. Upgrade Manual included.Special Thanks to Harald for the coding help and grandpaj for testing and idea. Link to comment Share on other sites More sharing options...
Guest Posted December 2, 2015 Share Posted December 2, 2015 @@Tsimi Hi Lambros Thanks for the update. Works well, as you know, if someone can "break" something its me. This addon seems to be "bullet proof". Here's another wee idea for your next update maybe, have a max value. Not important just a thought. Many thanks for the addon. Check it out on our site. I think you know the URL Cheers Grandpa Link to comment Share on other sites More sharing options...
Patty Posted July 24, 2016 Share Posted July 24, 2016 Hi there. This seemed easy to install, but it's not showing on the confirmation page and not adding the fee to the total! The option shows correctly on the checkout shipping page, it's configured correctly on admin without overlapping the sort order of the other installed modules and before the total. I check the option for gift wrap, but it doesn't show on confirmation page. I revised the installation over and over again and for the life of me I cannot find anything wrong! Can somebody help, please??? I've wasted over 2 hours on this already, thinking it wouldn't take more than 15 minutes to install it and getting it working. :( I'm using normal v2.3.4. BTW, the instructions file seems to be missing stuff. The text wasn't showing correctly on the checkout shipping page, but after I used the manual upgrade instructions, it did show fine. Tks for any help here, guys! :) Patty Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 25, 2016 Author Share Posted July 25, 2016 @@Patty I just installed this into a fresh osC EDGE shop and it worked just fine. Please re-check your code changes/additions in the checkout_shipping.php and checkout_process.php files. It is easy to make a mistake there. Some code exist in 3 different places but only one of them is the correct one. Link to comment Share on other sites More sharing options...
Patty Posted July 25, 2016 Share Posted July 25, 2016 OMG!! I'm so silly!! That did the trick, Tsimi! The very first part of the changes on checkout_shipping.php was wrong. There are 2 instances of if (!tep_session_is_registered('shipping')) tep_session_register('shipping'); and I located just the first one around line 60 when I should've gone for the one on line 109. To avoid this type of confusion for others maybe you should change the instructions a little bit and instead of that line of code that shows in 2 different places, maybe use this one: if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) { and add the code right ABOVE or BEFORE it. Anyway, thank you so much for your help and quick reply. Wonderful contribution, by the way! Thank you for sharing! :) Patty Link to comment Share on other sites More sharing options...
♥Tsimi Posted July 25, 2016 Author Share Posted July 25, 2016 @@Patty Great that it worked out. :thumbsup: Yeah, this addon sure could use an update maybe a header tags module for the checkout shipping stuff? :rolleyes: Need to find time to look into it once. Link to comment Share on other sites More sharing options...
MITCH70 Posted November 19, 2019 Share Posted November 19, 2019 Hi @Tsimi Great addon. Any chance for an update to Phoenix 1.0.3.0. And maybe campatible to work with the points and rewards addon from Raiwa. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.