Jump to content
Latest News: (loading..)

Recommended Posts

with the discount code you can enter the minus. it is possible that the discount code can not pass in the minus and blocked at 0 dollars.

otherwise you give your customers money.​

Share this post


Link to post
Share on other sites

@@dinopacha

 

Which Discount Addon are you talking about? Discount Code BS or Discount Coupon Codes 3.34?


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

I mean the addon discount code BS the one you made Tsimi.

I have installed it and it work perfect, but I read above that some had an issue with free shipping.

now my question is, which one has the issue.

 

also I hope you can help me with the question above about the minus. :rolleyes:

Share this post


Link to post
Share on other sites

@@dinopacha

 

Yeah, there is an issue with the Free Shipping module and that I cannot solve since the Free Shipping is calculated differently and somehow I am not able to add it to the Discount Code check.

For example you have Free Shipping setup to $42. Then you add the DVD Speed 2: Cruise Control (DVD price: $42) to the cart and checkout.

It shows "Free Shipping for orders over $42", so far it is working as it should but then in the Payment checkout page you insert a Discount Code for -$10 then the new total is $32 which is not free shipping anymore but it still shows Shipping: $0.00 in the checkout confirmation page.

So to add the free shipping check into the discount code check is the issue which I couldn't solve so I just simply removed free shipping from my shop.

 

The other problem regarding the minus total when using a discount code larger the the total.

You can either use marcochianas solution which will calculate only a discount for the product or you could replace the code on Line 110 with this

if ($discount > $order->info['subtotal']) {
$discount = $order->info['total'];
$order->info['total'] -= $discount;
} else {
$order->info['total'] -= $discount;
}

which will give you a total of $0.00 which might or most likely will cause problems with some payment modules like PayPal.

To be honest I never had a customer using a code that is larger then the total. You could write some notice that customers should not use the code if total is smaller then discount.

The whole Discount thing by far not perfect and I would recommend to use only discounts in % like -10% or -%20 and so on because you can't go into a minus with % discounts unless you make one that says -100% or -150% something like that.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi

 

​thanks for the explanation it is now completely clear to me. certainly for sending free, but it'll be fine.

concerning the discount I thought myself already, to do with percentages. because with amounts, it can go into the minus.

for the rest, I think it works perfectly, exactly what I need. super :)

Share this post


Link to post
Share on other sites

Hi all... just added Discount BS and got it set up and created a discount code.. but when does it show the discount to the customer... took the order all the way to PayPal and nowhere does it show discount... still regular pricing right up to the point of "pay now"..

 

thanks

Share this post


Link to post
Share on other sites

LMAO..... age is showing.....    I put the 10% discount in as the name... left the actual % blank.... 

 

 

(w00t)

 

 

Now it does factor in the discount during checkout (total is correct) however, it does not show the discount on the 'cart' page or even the amount of the discount anywhere including right up to paying with paypal..

 

 

any ideas wheat I've gotten wrong?

Edited by hyepo

Share this post


Link to post
Share on other sites

So I installed Ship In Cart (aka Shipping Estimator) v2.4.6 and now both the discount and the shipping shows on the shopping cart... PERFECT!

 

 

:)

Share this post


Link to post
Share on other sites

I have noticed one thing however.. when I set up the discount code BS on my live site, it calculates everything perfectly... however I did noticed a difference when getting over to  PayPal (express).

 

Before adding the module,  PayPal had a drop down that showed price, tax & total.  After adding module, it only shows total price (although correct, it no longer shows the drop down with the order breakdown on it...)...

 

any ideas.   Having the customer being able to review all charges on the PayPal end is a good thing... as it helps to instill confidence especially with a new site and new customers....

 

two images showing with coupon and no PayPal drop down and the second with no coupon code and with PayPal drop down 

 

 

post-323894-0-25699600-1449434668_thumb.jpg

post-323894-0-78854400-1449434747_thumb.jpg

Edited by hyepo

Share this post


Link to post
Share on other sites

Found two typos inside the Install manual.

 

Typo 1.) wrong path

 

It says

catalog/admin/includes/modules/boxes/catalog_dc_content.php

but it should be

catalog/admin/includes/boxes/catalog_dc_content.php

Typo 2.) Step 7.1

 

it says find

  tep_session_unregister('comments');

but it should say

if ( tep_session_is_registered('comments') ) {
  tep_session_unregister('comments');
}

I will fix those 2 typos and upload this Discount Codes BS to the addons section.

Thanks to @@phatman for pointing out typo 1.  Danke! :thumbsup:


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Discount Codes 3.2 BS

 

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

 

Discount Codes 3.2 BS addon for osC 2.3.4 Bootstrap version.
Based on the Discount Code for osCommerce 2.3.1 addon by high-quality-php-coding.com, updated for osC 2.3.4 BS by Tsimi

This addon is compatible with @@raiwa 's Ship In Cart addon
http://addons.oscommerce.com/info/9066


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

Another typo;

In my post #29 that code shown there is wrong it should say.

if ($discount > $order->info['subtotal']) {
$discount = $order->info['subtotal'];
$order->info['total'] -= $discount;
} else {
$order->info['total'] -= $discount;
}

There is also a tax issue that raiwa and I are working on. I will upload a new package with this above code fix and hopefully a fix for the tax issue. Stay tuned...


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi,

 

not sure if you saw the ot_discount.php module I uploaded to the ship in cart thread.

Here again in the correct forum:

 

 

I checked in all possible combinations and it sems to be ok

Share this post


Link to post
Share on other sites

Hi @@raiwa

 

Yeah I saw it thank you very much.

I downloaded and checked it and it calculates the right total but the taxes are too low now.

In my sample it should say Tax: $4.92 but now it says something like $1.89. I didn't had time to look at the code details yet but I will do that asap.

I am at the office right now and have no access to my test shop (home PC).

 

My test shop setup is

 

Tax: 19% (Taxable Goods)

Product price $18.90 Netto

Flat rate: $8.90 (Taxable goods)

Show prices with tax set to false

 

That should give me a total of $30.83 and taxes of $4.92

 

Sub-total: $18.90

Discount (10%) -1.89

Flat rate: $8.90

Tax: $4.92

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

Total: $30.83

 

That is what it should show then we are good.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@raiwa

 

BINGO! Very nice raiwa! That works. Correct tax and total now.

Thank you very much for this. I will now upload your fixed file to the addons area.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@raiwa

 

There is one last issue left but that is not a priority right now.

When you select discount by order totals and give a discount code that has a larger value then the subtotal it adjusts the discount to match the subtotal but the total goes into minus.

 

Example;

 

Subtotal: $18.90

Discount ($40) -$18.90

Flat rate: $8.90

Tax: $1.69

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

Total: -$14.50

 

Like I said not a priority at the moment since this is probably rather a rare case that someone uses a discount that is larger then the subtotal.

The previous issue is fixed though and that what counts.

 

Thanks again.


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

@@Tsimi,

 

I believe this is also fixed now.

I moved the check " if discount is higher than subtotal" before the tax correction.

Now if the discount is higher, only shipping cost and it's tax will apply to order total.

I believe this is correct shipping is always excluded from the discount, because discount is defined to apply on order subtotal, right?

 

Only case where a negative total will show is if someone defines a fixed product discount higher than the product price, but this wouldn't make sense. :-

 

Here the new ot_discount:

 

Edited by raiwa

Share this post


Link to post
Share on other sites

Perfect! Now all works as it should.

Fantastic Job there Rainer, as always. Very appreciate it. :pray:


When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

New Version 3.3 BS uploaded.

 

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

 

A big THANK YOU to @@raiwa for the tax calculation and larger discount than subtotal fix.

Also added version field into the module so that you can see quickly which version of the module is installed.

If you have an older version installed read the update instructions or download raiwas file from this thread and apply the code changes by using a comparison tool.

Edited by Tsimi

When you ask for help/support:

  • Always state your osCommerce version
  • If possible, list up installed add-ons
  • 3rd party templates are not supported in the forum

Latest osC: osCommerce CE (Community Edition aka. v2.3.4.1 Frozen)

 

Share this post


Link to post
Share on other sites

sorry..... but does not work correctly with two or more items :-

 

Sub-Total:     37,80 €  (2 x 18,90)
Discount (10pro):     - 3,78 € (Discount 10%)
Flat:     8,90 €
+ 19 % MwSt.:     8,15 €
Total:     53,32 €

Edited by phatman

Share this post


Link to post
Share on other sites

@@phatman,

 

I checked again and with the following settings it shows correct for me:

show prices with tax = false

tax applies to shipping module

 

 

 

I checked with order subtotal discount 10% and product discount each 10% and each fix amount of 2 $.

 

I also checked again with show prices with tax option set to true.

 

Results are all correct for me.

 

@@phatman Please post your exact store settings and all details of your example.

 

rgds

Rainer

Edited by raiwa

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

×