Jump to content
Latest News: (loading..)

Recommended Posts

@raiwa

@Tsimi

@@burt

 

All, I download the new file and have my team run the same series of test we did before and report back to you. It may take use a few days (if not a week or so) because we are in middle the holiday shopping, so we are doing good to keep things running at the moment.

 

To let you know we have run into another issue with the module. We have custom header module that @@burt developed for the number of items in the shopping cart in the header of our site (much like the default OSC). This has been working great then we started to get some issues reported by our customers that the shopping cart was dropping items. It turned out that the cart was not really dropping items, it was the counter was not being updated when the user exited the shopping_cart.php by using browser back button. At first, we thought we had a host of issues but discovered that when we turned off the discount codes module in Admin->Modules->Header Tags. The cart counter worked correctly.  So, something is not allowing the other header modules to work properly. I have not had time to dig into this issue but thought I would let you guys know in case you had any ideas on where we should start to look when we get a chance.

 

Thanks for all the help and I will get the team to test the new version as quick as I can....

 

Share this post


Link to post
Share on other sites

@@raiwa @@Tsimi

 

The relevant code in my module is this:

 

sprintf(MODULE_CONTENT_HEADER_CART_CONTENTS, $cart->count_contents())
Which gives this: "in your cart X items"

where X is the value of count_contents

 

This works well across multiple themes, and on multiple live sites.

See same on http://template.me.uk/responsive-zack/shopping_cart.php

 

For unknown reason, the HT code in this discount addon is interfering...


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites

@@nbkvh1i

@@burt

@@Tsimi

 

It is very strange, the discount code header tag code is wrapped inside if statements:

            if (basename($PHP_SELF) == 'checkout_payment.php') {

and:

            } elseif (basename($PHP_SELF) == 'logoff.php') {

so it shouldn't interfere in the shopping cart or any other page.

But having a look I saw that in the global list there is "$_GET" included which shouldn't be there.

I have no idea if this could interfere.

 

@@nbkvh1i, could you give it a try removing it from the global list.

In ht_discount_code.php it should then look like this:

        global $PHP_SELF, $oscTemplate, $sess_discount_code;

rgds

Rainer

Share this post


Link to post
Share on other sites

@@Rawi

@@Tsimi

@@burt

 

We update our development instance tonight with the 4.2 version and make the suggested global change. If it looks good in the dev instance, I will get the team to test overnight our time tonight.

 

Thanks!

Share this post


Link to post
Share on other sites

@Rawi

@Tsimi

@burt

 

The initial testing on the discounted codes is looking good. We still have not completed the full series of tests but thus far looking good. This includes with the removing the global $PHP_SELF, $oscTemplate, $sess_discount_code; line.  We still have additional test cases to execute but thus far is everything is working as expected.

 

The Shopping Cart Counter error I report is a false positive test case result.  I was reviewing the test case with the team and seen where that test case could produce a false-positive result.  Thus, it is not the global $PHP_SELF, $oscTemplate, $sess_discount_code; or any else in the module is the root cause of that issue. We have something else wrong with our site.

Share this post


Link to post
Share on other sites

@@nbkvh1i,

 

It wasn't said to complete remove the globals line. It was said to change it removing only $_GET so the result should be:

global $PHP_SELF, $oscTemplate, $sess_discount_code;
Edited by raiwa

Share this post


Link to post
Share on other sites

Hello from Switzerland

 

Quickly coming back to the discussion whether or not to clear a discount code:

 

How to to explain it to the customer?
There are general rules on the Internet: if the field is empty - everything has to be removed.
This is not true?

I do not insist.
I'm just saying my opinion.

 

I felt the same way as @@spidometrs. More of the logic: if I enter something I want to be able to erase it as well. And do we all know, how customers think?

 

I solved it for me that way:

 

In shop/includes/languages/english/modules/content/shopping_cart/cm_sc_discount_code.php find and edit :

define('MODULE_CONTENT_SC_DISCOUNT_HEADER_TITLE', 'Discount Code');

to

define('MODULE_CONTENT_SC_DISCOUNT_HEADER_TITLE', 'Discount Code <br><small><em>To delete the code please enter NULL</em></small>');

Adapt the text to whatever suits your taste. And don't forget the other language files as well.

 

Hint: <small> makes the text a bit smaller - <em> puts the text in italic and the <br> creates a new line.

 

The output looks as follows:

 

post-231861-0-48456800-1491247075_thumb.jpg

 

Maybe this helps anybody.

 

Kind regards - Felix


Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

A client who has happily been using this module for a while has now decided they want to run promotions where a number of products are discounted to specific prices (think of specials but with a coupon).

 

That's outside the scope of the current module design. I have a feeling that a general solution without breaking any of the currently working scenarios might be hard (and will certainly need a lot of testing!), so unless there is wider interest, I will do something specific for them and just test it against their data and processes.

 

However, I thought I'd ask if any of the other users of the module would also like to set up a single discount code that:

- gives different discount amounts against specific products

- totals them for multiples and combinations in the same order

If so, we'll look at how to widen the scope - I'm looking for input to requirements and help with testing.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

CCGV has the ability to offer discounts for specific products or entire categories.

 

http://addons.oscommerce.com/info/9020


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

 

CCGV has the ability to offer discounts for specific products or entire categories.

 

http://addons.oscommerce.com/info/9020

 

Thanks Frank but from a quick skim it looks to me that the basic design is pretty similar to this one: you can store multiple different product discount amounts with the same coupon code but as it stands only one of them will get applied.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

I'm not exactly sure what you mean. Each coupon has it's own amount that can be applied in CCGV, you can't have two different amounts for one coupon code.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

@@frankl scenario is

Promotion: Monthly offers,

- product A £5 off

- product B £2 off

- product C £10 off

 

Seems to me that this could be a wider requirement - hence the post.

 

Current addon design allows you to create these product discounts (one coupon per product) but

- if you give them all the same coupon code, the order total module just picks one of them to apply and ignores the rest

- if you give each of them its own code like 1704-A, 1704-B etc it works but you have to enter (and communicate) a code for each product and if someone wants to buy more than one offer item, they have to do a separate transaction for each

 

Multiple discount codes in a single order is a minefield that I don't want to enter.

 

Handling multiple product- and category-specific coupons with the same code could be made to work and is a better fit to the situation. It would need some hard restructuring in the order total module to process all the coupons with the same code and tally them and a more targetted admin screen wouldn't go amiss.

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (2.3.4.1 CE) here: https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

The scenario sounds quite logically and interesting. 

 

Myself - on the other hand - tend to make my life easy... If I would want to offer discounts like that I would rather:

 

-> calculate a percentage discount where the above conditions are met (always some might be a bit more favorable than others)

-> set up a percentage discount for just these products

 

As the discount for a reseller is normally more or less the same - depending on product groupe etc.. - I am able to find a percentage to go from there and offer a discount to my customers.

If it is not a "straight" number - anyway, customer gets his rebate and might decide to purchase the products or products.

 

Marketing would the read: Monthly offer: 25% (or whatever) off of Product A / B / C.

 

And I don't have to worry about a lot of configurating items and coupons that much.

 

Just from the perspective of KISS and my own opinion.

 

Kind regards - Felix

Edited by felix-swiss

Whoever finds errors and misspellings in my postings can keep them  o:)

 

Moving from 2.2 MS to 2.3.4 BS EDGE - and I love this version!

 

I might show "online" all the time - but I might be away from my computer  ;)

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

I see, so one coupon will take different amounts off different products in the same order. Very doable I think.


Let's make things easier for new osCommerce users http://forums.oscommerce.com/topic/402638-discussion-about-hard-coded-database-tables/?p=1718900  Getting there with osCommerce 2.4! :thumbsup:

Share this post


Link to post
Share on other sites

Hello,

Is it possible to see the discount code in the orders and in the invoice?

 

Now is "DISCOUNT -$10.00"

 

But could be better "DISCOUNT (asd645s) -$10.00"

 

Any help is appreciated

Marco

Share this post


Link to post
Share on other sites

Hello Marco @@marcochiana,

 

In: Admin => Catalog => Discount Codes => Check: "Include discount code in the order info" and it will show as you wish.

 

rgds

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

@@Tsimi, @@nbkvh1i,

 

New version 4.2 uploaded.

 

 

rgds

Rainer

 

Hi raiwa,

I have uploaded the 4.2.1 version, putted all the files in catalog and made the 2 changes in checkout_process.php and application_top.php.

I have installed the 2 modules from admin and selected a number for total_order (3):

- Administration -> Modules -> Order Total -> Install Module -> Discount Code -> Install Module

- Administration -> Modules -> Header Tags -> Install Module -> Discount Code -> Install Module

 

I have created a minimal discount code from" catalog -> Discount Code" like this :

Discount Code:  TEST5

Number of Use:

Discount: 5%                 (same result for 5)

Number of products to apply the discount:

for one order, empty is unlimited Minimum Order Sub-Total:

Include discount code in the order info Expiry Date:

Exclude specials pixel_trans.gif Applies to:    Order Sub-Total

 

I have the discount field that appears from checkout_payment page but when I enter the discount code there is always a "No entry" symbol...

I tried different combinations but nothing made, I always the symbole that appears with no consideration of the coupon.

Would you have a suggestion?

 

Thank you for your help. :)

Edited by milerwan

Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites
Ok, it's just I have modified the wrong file to add this script.

 



3. Modify the catalog/includes/application_top.php file.
--------------------------------------------------------------
3.1. Add to the end of the file

// Discount Codes 4.1 BS - start
if (MODULE_ORDER_TOTAL_DISCOUNT_STATUS == 'true') {
if (!tep_session_is_registered('sess_discount_code')) tep_session_register('sess_discount_code');
if (!empty($_GET['discount_code'])) $sess_discount_code = tep_db_prepare_input($_GET['discount_code']);
if (!empty($_POST['discount_code'])) $sess_discount_code = tep_db_prepare_input($_POST['discount_code']);
}
// Discount Codes 4.1 BS - end


 

Now it works. Sorry for the inconvenience and congratulations for this addon without core change ! 


Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

In "admin/discount_codes.php", the datepicker javascript seems to be wrong to call datepicker from v2.3.4.

 

I have changed the code and now it works (line 334):

<!-- old
<script type="text/javascript">
$(document).ready(function() {
  $('#expires_date').datepicker({
    dateFormat: 'yy-mm-dd'
  });
});
</script>
-->
<!-- new -->
<script type="text/javascript">
$('#expires_date').datepicker({
  dateFormat: 'yy-mm-dd'
});
</script>
<!-- new -->

Osc v2.3.4 BS "custom"

Share this post


Link to post
Share on other sites

Hello joe @@joe122joe,

 

I had a look on the payment module and it seems not so easy.

As far as I could see, the module itself doesn't process order totals, it passes the prices for each product and totals seem to be calculated at the payment page. So you would need to add the order total processing and then pass the discount amount like an additional item (product) with negative price.

Something similar is done in the paypal express module.

You chould have a look on it.

Or you could check the API of the payment provider if there is an order total discount variable available.

 

Anyway, not easy and not possible to give you exact instructions without having access to the payment processor for testing.

 

rgds

Rainer

Share this post


Link to post
Share on other sites

Hello

I have issue with discount field it is  show that the discount code not right ...

 

checked the discount code via admin and its right

post-339096-0-90420600-1493299042_thumb.png

Omar

Edited by Omar_one

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×