♥Tsimi 505 Posted March 4, 2015 @@kymation Thanks Jim. Time to do some digging. Share this post Link to post Share on other sites
Roaddoctor 24 Posted March 18, 2015 @@Tsimi This may only apply if you have Free Shipping per Product installed, not sure. /includes/classes/shopping_cart.php I changed // start Get 1 free // If this product qualifies for free product(s) add in the number of free products if (is_array ($free_product = $this->get1free ($products_id))) { // $total_items += $free_product['quantity']; // charge shipping on free item breaks shipping quote if purchased item is free shipping $total_items += "0"; // free shipping on free item if purchased item is also free shipping } // end Get 1 free might not be the correct way to do it, but the result works so far. should it be? $total_items += "0" ; or $total_items += 0 ; -Dave Share this post Link to post Share on other sites
♥kymation 625 Posted March 18, 2015 All of those have the same result: they add zero to the existing total of $total_items. Which is to say they do nothing at all. If that's really what you want, it would be better to just comment out that line. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
♥bruyndoncx 260 Posted March 18, 2015 LOL , a nice way to says "DO NOT ADD ANYTHING AT ALL" - it does make the code more explicit and easier to read :D KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Share this post Link to post Share on other sites
Roaddoctor 24 Posted March 18, 2015 (edited) Hi Jim, thanks for the reply. you are correct, just removing the whole block has the same result - fixes my error the same. Thank you. I was thinking that changing item quantity to 0 would be needed further down the code in the free item "item x weight" math result part, but I was not reading it correctly. I see now. Edited March 18, 2015 by Roaddoctor -Dave Share this post Link to post Share on other sites
Roaddoctor 24 Posted March 18, 2015 @@bruyndoncx fully confessed code noob... I just hack and break things mostly. -Dave Share this post Link to post Share on other sites
♥Tsimi 505 Posted March 19, 2015 (edited) @@Roaddoctor Hi Dave Regarding this whole Shipping Quotes and Get 1 Free. In my shop i have free shipping after a certain amount (stock osC function) for the Get Free item I do charge shipping. So if you buy item A and get item B for free shipping for A+B will be calculated and charged. Therefore I don't have any problems with this whole Get 1 Free and Shipping Quotes. I can imagine though people that use SSPP (Separate Shipping per Product) or other similar add-ons might get wrong results when using Shipping Quotes in cart. But I am glad that you could find a solution to fit your needs. :thumbsup: Still haven't figured out the date expire issue yet though...just no time at the moment to look deeper into it. :wacko: Edited March 19, 2015 by Tsimi Share this post Link to post Share on other sites
Roaddoctor 24 Posted March 19, 2015 OK I unwound above - probably not proper way to sort this. I have Free Shipping per Product, Get-One-Free, Shipping Quote in Cart 2.3.3.4 All is fine except for when BOTH the Purchased Item and Get-One-Free item has "Ship this item Free" selected. When that combination is present, the Ship Quote in Cart displays the FedEx quote Generic error rather than the "Free shipping for all of your cart products" message. not a critical error, but enough to dissuade a buyer I think. If anyone has any insight on how to properly correct that I would greatly appreciative. -Dave Share this post Link to post Share on other sites
Roaddoctor 24 Posted August 25, 2015 @@Tsimi @@kymation or anyone who may know the answer... When I go to use order editor (ajax enabled), if the order has a get one free item and I make a change to the order, such as products or shipping etc..., the SUB TOTAL recalculates incorrectly. The recalculation is including the value of the free item instead of $0.00. Where in the code is the sub-total recalculated? and any chance you know what change needs to be made? Thank in advance. Dave -Dave Share this post Link to post Share on other sites
♥kymation 625 Posted August 25, 2015 Free items are mostly handled in the cart class. I don't know if the order editor uses that class. Apparently not or this wouldn't happen. Sorry, I'm busy with a major site move right now and can't look at this further. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
♥Tsimi 505 Posted August 26, 2015 @@Roaddoctor Hi Dave I don't have the Order Editor installed in my shop so I can't tell you anything regarding it. I will install the Addon first and see if I can recreate the same issue that you have. Share this post Link to post Share on other sites
Roaddoctor 24 Posted August 26, 2015 to be more specific - it is only the Subtotal field that is ignoring the free aspect of the free item. The final total still calculates right. After looking at it more last night I suspect it's an AJAX issue ??? I know nothing about AJAX though.. -Dave Share this post Link to post Share on other sites
♥Tsimi 505 Posted August 28, 2015 (edited) @@Roaddoctor Hi Dave I did some testing in my local shop and there are several issues with that order editor addon but none of them are affecting the Get1Free addon. I tested both types of order editor with AJAX and without it. The results below are after switching things around like adding or removing products or change shipping method. Test Order 1: (International Customer) Product A - $16.25 Free Product - $0.00 ----------------------------------- Subtotal: $16.25 Shipping Method A: $10.40 ----------------------------------- Total: $26.65 Test Order 2: (Domestic Customer) Product A - $16.25 Free Product - $0.00 ----------------------------------- Shipping Method: $5.50 COD: $4.00 ----------------------------------- Total: $25.75 Sometimes it doesn't calculate the COD fee or you can't add a new field after the subtotal in AJAX mode. There are several issues either functional or calculating-wise but no issues with the Subtotal when Get1Free item is included. At least I cannot replicate that error. Order Editor used was this one (http://addons.oscommerce.com/info/7844) saiSoftIndia Version from 8 Aug 2011. Edited August 28, 2015 by Tsimi Share this post Link to post Share on other sites
dinopacha 11 Posted September 20, 2015 Hi tsimi,I have installed get 1 free on oscommerce bootstrap master.Now I have to do an adjustment in shoppingcart.php on line 102.$products_name .= '<br>' . tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'style="width: 45px;"') . tep_draw_hidden_field('products_id[]', $products[$i]['id']) . tep_draw_hidden_field('free[]', $products[$i]['free']) . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-refresh', NULL, NULL, NULL, 'btn-info btn-xs') . ' ' . tep_draw_button(NULL, 'glyphicon glyphicon-remove', tep_href_link(FILENAME_SHOPPING_CART, 'products_id=' . $products[$i]['id'] . '&action=remove_product'), NULL, NULL, 'btn-danger btn-xs'); it comes to glyphicon. it is removed in master ???? should it be adjusted or not ???? because it works properly I think. Share this post Link to post Share on other sites
dinopacha 11 Posted September 20, 2015 Can I change glyphicon glyphicon-refresh to fa fa-refresh or fa fa-refresh fa-spin. And change glyphicon glyphicon-remove to fa fa-times?? Share this post Link to post Share on other sites
♥kymation 625 Posted September 20, 2015 Yes, if you're using the latest version of osC Bootstrap Edge, the glyphicons have been replaced with Font Awesome icons. Replace with whatever looks good to you. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
dinopacha 11 Posted March 13, 2016 Hi, I want to know if it is possible to put in a product attribute? Share this post Link to post Share on other sites
♥kymation 625 Posted March 13, 2016 In the free product? Yes, with a workaround. In the products to get credit towards a free product? No. If you meant somethig else, please explain. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
dinopacha 11 Posted March 13, 2016 @@kymation, Hi Jim, I mean when you sell lingerie. You have an bra in the categorie/products. Now you have an short you put in in the product attribute. The bra will cost €???, (The short will cost €??? Only In combination with the bra). So you can not buy the short without buying the bra. (Because the short is not in the categorie/products itself) Now my question is when you put the bra in (get 1 free) I want to put in the short as the one you get free. I hope I explained it well. Share this post Link to post Share on other sites
♥kymation 625 Posted March 13, 2016 Put in the shorts as a regular product. Put that in a hidden category if you don't want to well it separately. Then set up the shorts as the free product for the bra. You could also just put the shorts and bra as one product, and state in the description that they come as a set, or the shorts are free with the bra. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
dinopacha 11 Posted March 13, 2016 (edited) @@kymation What to do if the get 1 free product has more colors and sizes to pick???? Now you can't choose different colors or sizes. Edited March 13, 2016 by dinopacha Share this post Link to post Share on other sites
♥kymation 625 Posted March 13, 2016 Then you can't do it this way. Set the colors/sizes as options and sell the products together. There is a Master Products addon that allows you to build a product by selecting parts. I don't know if that would work here, or if it's even up to date. Might be worth checking out though. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites
dinopacha 11 Posted March 13, 2016 @@kymation Thank you I will look for that. Share this post Link to post Share on other sites
AdmiralRedBeard 1 Posted December 29, 2016 I have installed the newest version of the Bootstrap Edge and have applied the Modular Products Page addon. Is there a fairly easy way to incorporate the code change to the product_info.php file for the Get 1 Free addon? Would this be it's own module or would it be added to an existing module? Any help that you can give would be greatly aapreciated. Share this post Link to post Share on other sites
♥kymation 625 Posted December 29, 2016 I would make it a separate module so that I could move it wherever I wanted it. You could add it to another module if you know that you want it to show right under/over that module's output. You will probably need to make other changes to the code, since the Modular Product Page gets its data from a product class. I'll try to help if you get stuck, but I don't have the time right now to code the whole thing for you. Regards Jim See my profile for a list of my addons and ways to get support. Share this post Link to post Share on other sites