Snarg Posted October 21, 2016 Share Posted October 21, 2016 My question is in reference to the module found here. To the best of my knowledge I have followed all of the install instructions to the letter. I have copied all required files and made the two file changes. The module installs just fine through the admin page and I am able to create an entry. However, upon checkout, an entry field for the discount code does not appear. I have no errors, but I also don't have a functioning discount code :( Does anyone have a screenshot of what it is supposed to look like? Please let me know what other information I may be able to give you. I am very much looking forward to this contrib. Any and all help would be greatly appreciated. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
frankl Posted October 21, 2016 Share Posted October 21, 2016 @@Snarg Hi Scott, did you follow these instructions?4. Install the Order Total module under Administration -> Modules -> Order Total -> Install Module -> Discount Code -> Install Module. Install the Header Tags module under Administration -> Modules -> Header Tags -> Install Module -> Discount Code -> Install Module.*OPTIONAL Install the Content module under Administration -> Modules -> Content -> Install Module -> Discount Code -> Install Module. Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
Snarg Posted October 21, 2016 Author Share Posted October 21, 2016 @@Snarg Hi Scott, did you follow these instructions? 4. Install the Order Total module under Administration -> Modules -> Order Total -> Install Module -> Discount Code -> Install Module. Install the Header Tags module under Administration -> Modules -> Header Tags -> Install Module -> Discount Code -> Install Module. *OPTIONAL Install the Content module under Administration -> Modules -> Content -> Install Module -> Discount Code -> Install Module. (sigh) Sometimes it's the simple things that slip right past you... I didn't install the header tags. Thank you so much for your help. I puzzled over it for hours. Thank you and have a great day. Quote Link to comment Share on other sites More sharing options...
frankl Posted October 21, 2016 Share Posted October 21, 2016 @@Snarg Been there, done that. Thank goodness I'm not the only one :) Quote osCommerce user since 2003! Link to comment Share on other sites More sharing options...
Guest Posted November 27, 2016 Share Posted November 27, 2016 (sigh) Sometimes it's the simple things that slip right past you... I didn't install the header tags. Thank you so much for your help. I puzzled over it for hours. Thank you and have a great day. I did all those steps and mine still doesn't work Quote Link to comment Share on other sites More sharing options...
SalsaTim Posted December 12, 2016 Share Posted December 12, 2016 Scott and Steven, Did either one of you every get the Discount Code BS working? I am exprencing the same thing even after I double checked that I Installed both the Order Total module and the Header Tag modules. I didn't install the Optional Content module? I am not seeing a place where the customer can enter a coupon/discount code and the discount/coupon amount field is not displayed on the order confirmation page. I didn't install the Optional Content module. I would really like to be able to use this function. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2016 Share Posted December 15, 2016 I installed it with and without the options and I have the same results as have been posted here. I'm beginning to wonder if these guys even test their projects before posting them. One thing I did find is when I created a MANUAL discount code (in attributes. I use I HAVE A CODE = -(percent in dollars) and I HAVE NO CODE. The customer chooses one or the other and enters the code in the COMMENTS section. The customer is advised that an incorrect code will void the transaction. Its the best I can do. Quote Link to comment Share on other sites More sharing options...
Guest Posted December 15, 2016 Share Posted December 15, 2016 Addendum: When I include this option with a product, I see DISCOUNT CODES: immediately preceding the option, but without the code option there is no mention of discount code. Anyone wishes to check it out can go to http://www.kinyadiggit.us/store1/catalog/index.php and "order" anything BUT the end table which has no code attached. The store is not active, just testing, so you can't buy anything. I have spent so much time trying to get this software up to speed that I haven ot had time to produce any products. Quote Link to comment Share on other sites More sharing options...
SalsaTim Posted December 15, 2016 Share Posted December 15, 2016 (edited) I was able to get Discount Code 4.2BS working after some advice that pointed me towards a link (http://www.oscommerce.com/forums/topic/407936-discount-code-bs/?p=1748875) here on the forum. Without the Comment code in Checkout_Payment.php file that is discribed in the link the Discount Code title and text field are not displayed on the Order Confirmation page! I had that section of code commented because I didn't want a order comment prompt and text area, once I uncommented the code the Discount Code prompt/title and text area were displayed and function perfectly. I was later able to remove the comment prompt and text area and still keep the Discount Code which I rename "Coupon Code". I hope this helps. @SalsaTim Edited December 15, 2016 by SalsaTim Quote Link to comment Share on other sites More sharing options...
♥Tsimi Posted December 15, 2016 Share Posted December 15, 2016 (edited) I'm beginning to wonder if these guys even test their projects before posting them.Yes, we do test our stuff before uploading it to the addons area. Attitude or comments like that won't help you either.You still haven't provided the information I asked you for in the other discount thread you posted. Keep in mind more info YOU provide the better and accurate we can help. Anyways, looking at your store from the link you posted I can see that you are running the "normal" osC 2.3.4 version. THIS addon, Discount Codes BS, was made/adapted for osC Bootstrap only. You cannot use that addon for your current shop. So you have two choices, either you install and use a Bootstrap version of osC or you install a Discount Codes addon that is compatible with your shop. For example with this one. http://addons.oscommerce.com/info/7700 If you want to know more about the community build Bootstrap stuff read here. http://www.oscommerce.com/forums/topic/396152-bootstrap-3-in-234-responsive-from-the-get-go/page-1 One more thing, if you see addons that have the 2 letters "BS" in their title name then they are most likely made for the Bootstrap version and are therefore not compatible with your current shop version. Edited December 15, 2016 by Tsimi raiwa, Gino D and Dan Cole 3 Quote Link to comment Share on other sites More sharing options...
Guest Posted December 18, 2016 Share Posted December 18, 2016 OK, so I don't know what happened, but I got the Discount Codes doing everything EXCEPT APPLYING THE DISCOUNT!!! I do notice that when I go to the modules =>Discount Codes link I see an error message: MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION Since I am not a programmer as most of you guys seem to be, I have no clue what that means, only that it doesn't look good. Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted December 18, 2016 Share Posted December 18, 2016 @@stevenlemon, if you see this error in your store and your store is not BS, you are still using the wrong version. Read again tsimis post. Tsimi 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
PiLLaO Posted April 1, 2017 Share Posted April 1, 2017 Will be possible to put the checkout_process.php code // Discount Codes 4.1 BS - start if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true' && !empty($discount)) { $discount_codes_query = tep_db_query("select discount_codes_id from discount_codes where discount_codes = '" . tep_db_input($sess_discount_code) . "'"); $discount_codes = tep_db_fetch_array($discount_codes_query); tep_db_perform('customers_to_discount_codes', array('customers_id' => $customer_id, 'discount_codes_id' => $discount_codes['discount_codes_id'])); tep_db_query("update discount_codes set number_of_orders = number_of_orders + 1 where discount_codes_id = '" . (int)$discount_codes['discount_codes_id'] . "'"); tep_session_unregister('sess_discount_code'); } // Discount Codes 4.1 BS - end Into header_tags module? function execute() { global $PHP_SELF, $oscTemplate, $sess_discount_code; if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') { if (basename($PHP_SELF) == 'checkout_payment.php') { ob_start(); include('ht_discount_code/ht_discount_code.php'); $template = ob_get_clean(); $oscTemplate->addBlock($template, $this->group); } elseif (basename($PHP_SELF) == 'logoff.php') { if (tep_session_is_registered('sess_discount_code')) { tep_session_unregister('sess_discount_code'); } } } } Best regards :) Quote Link to comment Share on other sites More sharing options...
♥raiwa Posted April 1, 2017 Share Posted April 1, 2017 Hola Gustavo @@PiLLaO, It's not possible in a header tag. Header tags are loaded before all the checks in checkout_process.php main page are performed. So it would be possible that the code is executed even the checkout is not successful and the customer is redirected to previous pages. It could be moved into a hook, but then there would be still code changes needed in the checkout_process.php file to call the hook in the right place. I would await for 2.4 to do it. rgds Rainer PiLLaO 1 Quote About Me: http://www.oscommerce.com/forums/user/249059-raiwa/ Need help? How To Get The Help You Need Is your version of osC up to date? You'll find the latest osC community version CE Phoenix here. Public Phoenix Change Log Cheat Set on Google Sheets Link to comment Share on other sites More sharing options...
PiLLaO Posted April 3, 2017 Share Posted April 3, 2017 Ok, thanks :) Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 Paypal App not working with this not showing Discount in paypal standard. I am using v5.018 anyone? I followed the instructions but nothing. I am getting frustrated maybe switch to magento Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted September 14, 2017 Share Posted September 14, 2017 1 hour ago, tmcca said: Paypal App not working with this not showing Discount in paypal standard. I am using v5.018 anyone? I followed the instructions but nothing. I am getting frustrated maybe switch to magento It is my understanding that the Discount Code module will not work with Paypal standard...you need to use PayPal Express. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 got ya; I am looking into why I think perhaps I found solution testing now Quote Link to comment Share on other sites More sharing options...
Dan Cole Posted September 14, 2017 Share Posted September 14, 2017 I would be interested in your solution if you find one....Rainer and Lambros I'm sure will be interested in it too. Dan Quote Need help? See this thread and provide the information requested. Is your version of osC up to date? You'll find the latest osC community version (CE Phoenix) here. Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 Your correct works in express only. Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 (edited) I think you have to make it an item with negative price that is problem I think. Discount according to PayPal API no longer supported and call the item discount Edited September 14, 2017 by tmcca Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 I am guessing this code below prints the receipt to customer Item, Amount, Subtotal, Tax, and total. I am looking to add ot_discount and print that line. Anyone? if ($GLOBALS[$class]->enabled) { for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) { if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) { if ( !in_array($GLOBALS[$class]->code, array('ot_subtotal', 'ot_shipping', 'ot_tax', 'ot_total')) ) { $item_params['item_name_' . $line_item_no] = $GLOBALS[$class]->output[$i]['title']; $item_params['amount_' . $line_item_no] = $this->_app->formatCurrencyRaw($GLOBALS[$class]->output[$i]['value']); $items_total += $item_params['amount_' . $line_item_no]; if ( $item_params['amount_' . $line_item_no] < 0 ) { $has_negative_price = true; } Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 14, 2017 Share Posted September 14, 2017 Is that code above send parameters to PayPal for receipt? Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 15, 2017 Share Posted September 15, 2017 (edited) Okay I got it working I think please test on your end: Line #363 change this to 'amount_1' => $this->_app->formatCurrencyRaw($order->info['total'] - $order->info['shipping_cost'] - $total_tax + (empty($discount) ? 0 : $discount)), // Discount Code Line #387 Find if (is_numeric($sendto) && ($sendto > 0)) { Add this before this: // Discount Code - start if (!empty($discount)) { $parameters['discount_amount_cart'] = $this->_app->formatCurrencyRaw($discount); } // Discount Code - end Find function before_process() { Add global $discount to the global variables That should be it Edited September 15, 2017 by tmcca Quote Link to comment Share on other sites More sharing options...
tmcca Posted September 15, 2017 Share Posted September 15, 2017 (edited) @Dan Cole @Rainer @lambro I like to add this to the app on oscommerce but not sure how. Test this please before I am using Paypal APP V5.018 Edited September 15, 2017 by tmcca 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.