SuperCharlie Posted September 24, 2012 Share Posted September 24, 2012 The [spam-filter] and I run a gift shop for parrot stuff. We are affiliated with 6 parrot rescues which take sick and abused birds, rehab them and adopt them out to good homes. I need to add a way to make a donation to a rescue at checkout. I thought..well.. make a donation "product" let them pick it on checkout and viola.. but no. We have free shipping at $50 and our shipping scheme puts cost on shipping for items..yada yada.. so if someone bought a cheap item and donated 49.00 they get free shipping and we end up losing on small margin items. What I need to do is add an item at the confirm screen (if the client clicks add) which doesnt contribute to free shipping and which processes along with the rest of the cart items in paypal. In short, just add an item at the end and go to paypal. I dont even care if it shows up in the backend, I will take care of that from the paypal end. Any clues on how to accomplish this would be extremely appreciated. Thanks, SC Link to comment Share on other sites More sharing options...
tomerg3 Posted September 25, 2012 Share Posted September 25, 2012 IT would probably be best to remove the donation amount from the free shipping calculation, rather than try to mess around with the checkout process which could easily break especially with paypal (as all the amounts must add up). Link to comment Share on other sites More sharing options...
SuperCharlie Posted September 25, 2012 Author Share Posted September 25, 2012 Thank you for the reply tomerg3, Maybe Im wrong, but from my banging on this, the free shipping seems to be driven by the cart total. This is where I keep getting tripped up.. especially since I am hoping to allow for various amounts to be donated.. anywhere from $1 to $100. I also completely understand and agree about wrenching with the cart and paypal functions. I have been searching for a couple days now on how to make this work. My [spam-filter], the advertising/promotion end of this, has kinda offered this up already..and now Im under the gun to make it happen. Surely there is a way to add an amount and description to the vars before they head off to paypal.. its just the code (1.4.8.2) is so thick and function-included that it makes tracking down the place to add a real umm.. "challenge". Seems like such an easy request... but then ya get to doing it and BAM.. how about 3 days of hunting Waldo. Link to comment Share on other sites More sharing options...
tomerg3 Posted September 25, 2012 Share Posted September 25, 2012 The free shipping is calculated in Cart.php getShippingCost (or something like it). It checks the current cart total against the free shipping limit. you can assignt he cart total to a temp variable, iterate through all the current cart products, if you find the donation product, deduct its amount from the temp cart total, and you should have the total of the normal products (no donation), 1 Link to comment Share on other sites More sharing options...
SuperCharlie Posted September 25, 2012 Author Share Posted September 25, 2012 Thanks for the breadcrumbs man. I will see if I can track it down cart.php in my version is actually just a pointer to the controller but I get what you are saying. 'preciate the hint SC Link to comment Share on other sites More sharing options...
tomerg3 Posted September 25, 2012 Share Posted September 25, 2012 /classes/Cart.php Link to comment Share on other sites More sharing options...
SuperCharlie Posted September 25, 2012 Author Share Posted September 25, 2012 /classes/Cart.php Gotcha.. thx... Link to comment Share on other sites More sharing options...
SuperCharlie Posted September 25, 2012 Author Share Posted September 25, 2012 Just a quick update.. with your breadcrumbs I conquered this one tomerg3... thx. I would post the code, but its pretty site-specific and if ya cant do it from this thread ya prolly shouldnt be in there. Link to comment Share on other sites More sharing options...
tomerg3 Posted September 25, 2012 Share Posted September 25, 2012 Glad I could help Link to comment Share on other sites More sharing options...
Recommended Posts