ffeingol Posted November 1, 2008 Share Posted November 1, 2008 Hello, If we use a URL like: cart.php?a=add&pid=42&promocode=ABCDEF It works great and the promo is automatically applied. If we use a URL like: cart.php?gid=2&promocode=ABCDEF To let the client pick the package within the group, the promo code does not apply (the promo code is valid for the entire group). Can a promo code be passed so it works for an entire group and not just a single product? 0 Quote Link to comment Share on other sites More sharing options...
SnakeDiver Posted November 1, 2008 Share Posted November 1, 2008 You should be able to put in {php} {/php} tags on the first entrance to your order stream, something like $_SESSION['group_promocode'] = $_GET['promocode']; And then just put the promocode into the text box when it comes to that point (using other {php} tags to put it into SMARTY (i.e. inside an if statement: $this->assign('hasPromocode', true); $this->assign('promoCode', $_SESSION['group_promocode']))). I don't like the idea of doing this because it puts code into the View layer. In all honesty I can't stand the smarty template engine because it has {if} and {foreach} blocks (Model / Controller and View should never be together in my opinion). Then again, WHMCS doesn't seam to be exactly MVC, but that's a discussion for another day. Anywho, yeah. It could be done.. theoretically, not elegantly, and hackishly.. but it could be done. Cheers, 0 Quote Link to comment Share on other sites More sharing options...
lindavdz Posted November 1, 2008 Share Posted November 1, 2008 I have this same problem. 0 Quote Link to comment Share on other sites More sharing options...
jozeph Posted November 2, 2008 Share Posted November 2, 2008 Yeah! I confirm this. You may report as bug to be fixed. 0 Quote Link to comment Share on other sites More sharing options...
ffeingol Posted November 2, 2008 Author Share Posted November 2, 2008 Right now I don't know if it's a bug or feature Can someone from WHMCS comment if we should be able to pass a promo code to a group just like we do for individual packages? 0 Quote Link to comment Share on other sites More sharing options...
nhouck Posted November 4, 2008 Share Posted November 4, 2008 You should be able to. The code on the group page is not capturing the code from the parameters list and passing it on to the next step, so this should be a bug. Whatever parameters are passed should propagate through the order process. Basically what SnakeDiver said, but you shouldn't have to do this yourself, it should already work like that. 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted November 5, 2008 Share Posted November 5, 2008 A promo code only applies to a specific product. Go to Add Promotion Code and look in the Applies To box. You can hold ctrl and select multiple products or all the products in that group and then that promo code will work for any product in the group. 0 Quote Link to comment Share on other sites More sharing options...
ryanz Posted January 6, 2010 Share Posted January 6, 2010 A promo code only applies to a specific product. Go to Add Promotion Code and look in the Applies To box. You can hold ctrl and select multiple products or all the products in that group and then that promo code will work for any product in the group. I tried selecting multiple products (ctrl and select) in the Applies to field of the Promotional Code section but it keeps falling back to only one item. How do we setup one Promotional Code that applies to multiple products? 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted January 7, 2010 Share Posted January 7, 2010 I tried selecting multiple products (ctrl and select) in the Applies to field of the Promotional Code section but it keeps falling back to only one item. Then you have something wrong with your browser or your php implementation Try ctrl-a to select them all - does that work ? 0 Quote Link to comment Share on other sites More sharing options...
ryanz Posted January 7, 2010 Share Posted January 7, 2010 I can select multiple kines in all other text areas and they work 100% but the one for Promotion Code does not. It selects the lines but does not save to the DB. The database entry shows for example 1, Meaning it saves the first item, then places the comma for the next but does not store the remainder. No errors in any logs. 0 Quote Link to comment Share on other sites More sharing options...
ryanz Posted January 7, 2010 Share Posted January 7, 2010 WHMCS Support sent me a replacement patched configpromotions.php file. Everything work snow. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted January 7, 2010 WHMCS Support Manager Share Posted January 7, 2010 Please open a support ticket and we can provide a fix. 0 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.