Zen Cart Logo
Forums / General Questions / Change price calculation?

Change price calculation?

Views: 621

Results 1 to 7 of 7
18 Jan 2013, 6:57 PM
#1
keatonic avatar

keatonic

New Zenner

Join Date:
Nov 2012
Posts:
5
Plugin Contributions:
0

Change price calculation?

Hello,

I'm the developer for a website that recently started using Zen Cart. There is a tax rate of 8% to be used on every purchase. (It's not actually a 'tax' per say, but using the tax function was the easiest way to set it up). Also, every product has been put on a 50% special. If a user buys from the Zen Cart store, they are put into a rewards club (which is what gives them 50% off). Finally, there is a custom script that lists every order's details for easy import into an external tracking system.

The 8% 'tax' mentioned above is SUPPOSED to be taken out of the FULL product price (i.e. $60 instead of $30). To try and work around this, I made the 'tax' 18%, but now it interferes with our product attributes (Same price, +$10, and +$20)

What I need to do is change the way Zen Cart adds up the final price to allow 8% to be taken from this: FULL price + Shipping (Always $19.99) + Attributes (+$0/+$10/+$20).

Is there an easy way to change this? If not, what file is the final price calculated in? Like I said, I'm a PHP developer, so changing it shouldn't be a problem, if I knew what file to look in!

20 Jan 2013, 4:42 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Change price calculation?

Can't make head or tail of what you are attempting to do...

20 Jan 2013, 8:40 PM
#3
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,777
Plugin Contributions:
11

Re: Change price calculation?

Perhaps I can help with translation as I've been here longer.:P

What Schoolboy is saying is that it appears you are doing what a lot of us did when we arrived (uninformed) about Zen Cart. It's like you want to create a letter to the boss but you only have Excel and not Word.

You would be better off to get a plain-Jane test of ZC running first with specials and proper zones/taxes. In other words, get as close to a fix as possible without trying extra "additions" that may just make the problem worse.

And, yes, a better scenario provided by you would help those of us who've "been there" to better help you.

  • Why does the user have to buy to receive the discount?
  • Is the discount issued ON the first purchase or the NEXT?
  • ZC (in it's natural state) handles taxes quite well as it cares not about specials/discounts/etc but bases the tax on the adjusted amount sent to the cart. So why the need to double?
  • Why is a tax "taken out of" versus added to the price?
  • Wouldn't something "taken out" be a discount?
    Hopefully you can better understand our confusion as to your final intent.
22 Jan 2013, 5:32 PM
#4
keatonic avatar

keatonic

New Zenner

Join Date:
Nov 2012
Posts:
5
Plugin Contributions:
0

Re: Change price calculation?

I'll try to clarify my post, I didn't realize it was confusing!

**Why does the user have to buy to receive the discount? ** All of the products in the store are set up on the discount. We use ZC for our discount club members, and a different store system for those who are not in the club.

**Is the discount issued ON the first purchase or the NEXT? ** The first purchase, then they are given other special offers that don't pertain to ZC for future purchases.

**ZC (in it's natural state) handles taxes quite well as it cares not about specials/discounts/etc but bases the tax on the adjusted amount sent to the cart. So why the need to double? ** I need the tax to be based on the full amount, not the adjusted amount.

**Why is a tax "taken out of" versus added to the price? ** It is added. Excuse my typo.

**Wouldn't something "taken out" be a discount? ** Yes :P

29 Jan 2013, 6:24 PM
#5
keatonic avatar

keatonic

New Zenner

Join Date:
Nov 2012
Posts:
5
Plugin Contributions:
0

Re: Change price calculation?

Sorry for the bump, but I could really use some help.

Does anyone have any idea on this?

30 Jan 2013, 1:48 AM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,777
Plugin Contributions:
11

Re: Change price calculation?

Don't know your state or its tax rules but, in the State of Texas, it is illegal to charge tax on the original amount of a discounted purchase. If I sell a $100 item for $50, I cannot legally charge more than $4.13 (tax on $50).

Your scenario (as I understand it) is way outside the standard for ecommerce and would take a considerable rewrite of ZC code.

You could (with existing code) require users to login to see prices, which might handle the different price for regular customers.

You can (with existing code) create various coupons to provide further discounts on later purchases, but you state they would be non-ZC discounts.:huh:

And, you say to the customer "you can buy this $100 item for $50 but you have to pay tax on the $100." I can't see anyone jumping in for that opportunity.

30 Jan 2013, 2:12 AM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Change price calculation?

Like I said, I'm a PHP developer
Try looking at /includes/classes/shopping_cart.php