hiltonroutley Posted June 15, 2012 Share Posted June 15, 2012 Would really appreciate the help if someone could tell me how to make a shipping charge go with downloadable products. I set up in my shop the "shipping" charge to "Service Charge" so it's important that I get a shipping charge to show up with my downloadable products because my shop does downloadable tickets. Someone please help! www.gofest.ca Link to comment Share on other sites More sharing options...
bellini13 Posted June 16, 2012 Share Posted June 16, 2012 you can specify in the product if there is an additional shipping cost Link to comment Share on other sites More sharing options...
hiltonroutley Posted June 22, 2012 Author Share Posted June 22, 2012 That's what I want to do. I use that feature but then it doesn't show up because it's a downloadable product. Anyone know how to fix this? PLEASE HELP! Link to comment Share on other sites More sharing options...
hiltonroutley Posted June 26, 2012 Author Share Posted June 26, 2012 No-one knows how to fix this? Link to comment Share on other sites More sharing options...
evanburke Posted July 31, 2012 Share Posted July 31, 2012 I'd also really like some help with this. It's got to be like 1 line of programming somewhere. All I really need is the ability to add the additional shipping fees REGARDLESS if its downloadable or not. Link to comment Share on other sites More sharing options...
bellini13 Posted July 31, 2012 Share Posted July 31, 2012 Its a matter of tracing through the code and removing any conditions of virtual products from the logic. If you'd like to hire someone for that project, send me a PM and we can discuss those details. Link to comment Share on other sites More sharing options...
evanburke Posted July 31, 2012 Share Posted July 31, 2012 (edited) "any" conditions? "any" conditions will remove a lot of other functionality. It needs to be the specific condition for adding shipping costs in the cart. That's all. That's why I'm saying it's probably line of code somewhere. Edited July 31, 2012 by evanburke (see edit history) Link to comment Share on other sites More sharing options...
evanburke Posted July 31, 2012 Share Posted July 31, 2012 (edited) Ok, I found a quick solution. I need to test it fully to make sure it's not impacting any other functionality: Open /classes/Cart.php and go down to line 1433. Edit the function isVirtualCart() so it looks like this: public function isVirtualCart(){return false;} Seems to be working great though. I can add "Additional Shipping" for downloadable products, and now that extra cost gets calculated in my cart. Edited July 31, 2012 by evanburke (see edit history) Link to comment Share on other sites More sharing options...
evanburke Posted July 31, 2012 Share Posted July 31, 2012 hiltonroutley, I use the "Additional Shipping" costs for downloadable products the same way you do, as a service charge. Link to comment Share on other sites More sharing options...
bellini13 Posted July 31, 2012 Share Posted July 31, 2012 have you tried to place an order and download the product after making that change? Link to comment Share on other sites More sharing options...
hiltonroutley Posted July 31, 2012 Author Share Posted July 31, 2012 Ah!! THANK YOU!!! I have been waiting so long for this! 1 Link to comment Share on other sites More sharing options...
hiltonroutley Posted July 31, 2012 Author Share Posted July 31, 2012 Everything seems to run smoothly so Im very very happy. I think everything should still download just fine though. If it doesn't ill post up here after someone does a purchase. Thank you very much evanburke Link to comment Share on other sites More sharing options...
evanburke Posted July 31, 2012 Share Posted July 31, 2012 (edited) Yes I tested this all the way through the checkout process. You can still download the product after paying for it. It seems to be working correctly. Edited July 31, 2012 by evanburke (see edit history) Link to comment Share on other sites More sharing options...
hiltonroutley Posted August 2, 2012 Author Share Posted August 2, 2012 just to clarify for any others that need help. I'm also making sure with evanburke this is the right way to do it. so in cart.php you go to the part of the code that says public function isVirtualCart() { if (!isset(self::$_isVirtualCart[$this->id])) { $products = $this->getProducts(); if (!sizeof($products)) return false; $list = ''; foreach ($products AS $product) $list .= (int)($product['id_product']).','; $list = rtrim($list, ','); $n = (int)Db::getInstance()->getValue(' SELECT COUNT(`id_product_download`) n FROM `'._DB_PREFIX_.'product_download` WHERE `id_product` IN ('.pSQL($list).') AND `active` = 1'); self::$_isVirtualCart[$this->id] = ($n == sizeof($products)); } return self::$_isVirtualCart[$this->id]; } Then you add "{return false;}" and remove the rest so it should look like this? public function isVirtualCart(){return false;} Link to comment Share on other sites More sharing options...
bellini13 Posted August 2, 2012 Share Posted August 2, 2012 the proper way would be to create an override of the Cart class. this way you can more easily retain the customization through upgrades. search for overriding class files in the forum Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now