Jump to content

Recommended Posts

The discount code appears on the checkout_payment page, below the list of payment options


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

All,

I am having the same issue as @@Umb. I just installed 3.8BS on top of 2.3.4 OSC BS. I have all the modules setup and configured and created a simple order total discount but nothing is showing up on the checkout_payment page for the customer to enter the code/coupon value.

 

One thing I did notice in the instructions is that they jump from step 3.1 to step 8. Are some instructions missing that we are not completing and thus creating the issue? 

3.1. Add to the end of the file

  // Discount Codes 3.8 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($HTTP_GET_VARS['discount_code'])) $sess_discount_code = tep_db_prepare_input($HTTP_GET_VARS['discount_code']);
    if (!empty($HTTP_POST_VARS['discount_code'])) $sess_discount_code = tep_db_prepare_input($HTTP_POST_VARS['discount_code']);
  }
  // Discount Codes 3.8 BS - end

 
/********************************/
/* SETUP/CONFIGURATION          */
/********************************/  
8. 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.

 

Share this post


Link to post
Share on other sites

If you are trying to install the addon on the latest Edge, there may be problems due to the Global Variables changes which have just gone in.

 

I incorporated this for a client last month and don't remember finding any major deficiencies in the documentation... but it was very much a rush job.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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 installation instructions do not mention any change to make in the file catalog/checkout_payment.php. Only a little one on catalog/checkout_process.php and one in catalog/includes/application_top.php. Is that correct?
My installation is a fresh one of the BS edge release.

Edited by Umb

Share this post


Link to post
Share on other sites

The installation instructions do not mention any change to make in the file catalog/checkout_payment.php. Only a little one on catalog/checkout_process.php and one in catalog/includes/application_top.php. Is that correct?

My installation is a fresh one of the BS edge release.

 

It's the header tags module that makes the field appear on checkout_payment. I've just checked and the client install only had those two files updated.

 

There have been a lot of changes released on Edge in the last couple of weeks - including the replacement of filename constants, using $_GET instead of $HTTP_GET_VARS and so on. It's possible that something here is clashing with the addon - I'll have a look at it.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Apologies! My download was Discount Codes 3.7 BS, this will take a bit more looking into...


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Looking for advice here; Should we uninstall and drop back to 3.7 until the issues with 3.8 are resolved or do you think those will be resolved quickly. I was hoping to roll this out with a new version of the site but now wondering if I need to back it out for now or go with 3.7 and not hold up a release.

Share this post


Link to post
Share on other sites

OK - you just need to change the filename constants in the header tags module to actual filenames...

 

so that the execute function looks like this:

    function execute() {
        global $PHP_SELF, $HTTP_GET_VARS, $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');
                }
            }
        }
    }

If there are any  other funnies, look for something like FILENAME_CHECKOUT_PROCESS and replace with the actual file name.

Edited by BrockleyJohn

For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

fixed version in a github branch here: https://github.com/BrockleyJohn/Responsive-osCommerce/tree/addon_discount_codes_bs

 

There was another example in the shopping cart module


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Yeah, the EDGE version had a couple new commits in the past days/weeks and is moving fast forward.

Addons need to be updated now to be compatible with those new changes, as BrockleyJohn mentioned.

 

I see if I can update this addon tonight after work and upload a new version of it.

 

@@Umb

 

Just create a zip package of the italian language files and attach it here.

Edited by Tsimi

Share this post


Link to post
Share on other sites

@@BrockleyJohn

Thank you so much, BrockleyJohn!
I modified the function in the header tags module and now I can see the input field! :-) It seems that once inserted a discount code, it remains valid for all the purchases made after, even if the product where it was inserted is removed from cart. I made the discount unlimited in use , so I think this is normal. Maybe it will be removed only after session ends?
Do you think that modifying the function is enough, or should I dowload the complete fixed version? I do nopt understand what you mean with "There was another example in the shopping cart module".
I am going to sleep now Thank you again, I hope to read your answer tomorrow.
 

Share this post


Link to post
Share on other sites

@@BrockleyJohn

Do you think that modifying the function is enough, or should I dowload the complete fixed version? I do nopt understand what you mean with "There was another example in the shopping cart module".

I am going to sleep now Thank you again, I hope to read your answer tomorrow.

 

 

Sorry for not being clear, I meant that in includes/modules/content/shopping_cart/cm_sc_discount_code.php you need to change

FILENAME_SHOPPING_CART to 'shopping_cart.php'

 

Buona notte


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

Buongiorno! :-)
Now I have it clear, I guess that change is not needed on my installation as I did not apply the modular shopping-cart.
Wish you a wonderful day, Blessings!

Share this post


Link to post
Share on other sites

@Tsimi

 

This is the complete Italian version. It's working on my machine (I could not test the modular shopping cart, as I did not install it, but the translation should be correct.

I left the names of language in lower case, but on my release of OsCommerce 2.3.4 BS Edge I had to rename both the directories (under catalog/admin/includes/languages and catalog/includes/languages) with Italiano (initial uppercase) in order to have OsCommerce see them.

Same I had to do with the main language file under catalog/includes/languages. It has to be Italiano.php.
This question is NOT related to Discount Code, it belongs to the initial OsCommerce 2.3.4 BS Edge installation.
Again thank you for your wonderful work, Blessings!
Umberto

 

Discount_Codes_3.8_BS-ITA.zip

Share this post


Link to post
Share on other sites

I left the names of language in lower case, but on my release of OsCommerce 2.3.4 BS Edge I had to rename both the directories (under catalog/admin/includes/languages and catalog/includes/languages) with Italiano (initial uppercase) in order to have OsCommerce see them.

Same I had to do with the main language file under catalog/includes/languages. It has to be Italiano.php.

This question is NOT related to Discount Code, it belongs to the initial OsCommerce 2.3.4 BS Edge installation.

It's not Edge either, which knows nothing about any language except english! A search of Edge for "taliano" gets no matches. It comes from how you set up your "additional" language install. You must have an entry in your database with a capital letter in the directory name as well as the file name.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

You must have an entry in your database with a capital letter in the directory name as well as the file name.

 

sorry that should read "a capital letter in the directory name as well as the language name"


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

It's not Edge either, which knows nothing about any language except english! A search of Edge for "taliano" gets no matches. It comes from how you set up your "additional" language install. You must have an entry in your database with a capital letter in the directory name as well as the file name.

I really did not make anything to the db and I am pretty sure that the first install of Italian language I inserted there the file and directory name in lowercase as they were in the package, but it was not working. I saw that include and require errors were pointing to uppercased names, so I renamed and all went fine.  Now I've tried again to change to lowercase in the language setup edit module and in the names, but all includes and requires both in admin and catalog started again claiming they want the uppercase "I"s.... :-)))

Not a big problem, anyway, as long as it works, I was only wondering the why of this anomaly.

Share this post


Link to post
Share on other sites

@@Tsimi
Mine it's such a little contribution, but if you may need any other translation from English to Italian, please do not esitate to ask me.

Share this post


Link to post
Share on other sites

@@BrockleyJohn

 

Thanks John for jumping in and helping out here. :thumbsup:

 

no problem - I happened to be passing... I expect we're going to get a lot of this across the addons


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

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

@@Tsimi

If I can point out another little problem:
In catalog/shopping_cart.php I have two Checkout options: a green button "Checkout" and the PayPal express checkout.

If I use the PayPal button, I miss the possibility to insert the Discount Code, as I am brought directly on PayPal site. I can input the discount code only if I follow the green Checkout button.

I worked around this problem removing the PayPal button from shopping_cart.php and moving it to the checkout_payment.php file, replacing the generic green button "Continue" that was there..

Share this post


Link to post
Share on other sites

I have found that the discount is not applied correctly when the product has attributes with value.
If the product has value 100 and the attribute has value 50, the discount only applies to product value (100).


Product value: 100
attribute value: 50
discount Value: 10

Example 1:
Subtotal: 150.00
Discount: 10.00

Total: 143.33 = (150 - ((10/150) * 100)))

---------------------------

Example 2:
Subtotal: 150.00
10% discount: 15.00

Total: 140,00 = (150 - (100 * 10%))

I hope you understand ;)

Share this post


Link to post
Share on other sites

@f.figue

 

Which version of this addon do you currently use?

What is your osC version?

Did you add any attributes addon?

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

×