Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2012
    Posts
    5
    Plugin Contributions
    0

    Default 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!

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,269
    Plugin Contributions
    3

    Default Re: Change price calculation?

    Can't make head or tail of what you are attempting to do...
    20 years a Zencart User

  3. #3
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,716
    Plugin Contributions
    13

    Default Re: Change price calculation?

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

    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.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  4. #4
    Join Date
    Nov 2012
    Posts
    5
    Plugin Contributions
    0

    Default 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

  5. #5
    Join Date
    Nov 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Change price calculation?

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

    Does anyone have any idea on this?

  6. #6
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,716
    Plugin Contributions
    13

    Default 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.

    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.
    A little help with colors.
    myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
    Free SSL & Domain with semi-annual and longer hosting. Updating 1.5.2 and Up.

  7. #7
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Change price calculation?

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

 

 

Similar Threads

  1. price calculation not correct! Help!
    By simpledomaining in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 16 Nov 2011, 11:11 AM
  2. Price calculation and rounding
    By Ryk in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 0
    Last Post: 6 May 2011, 05:23 PM
  3. wrong attribute price calculation ?
    By vasilios in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 23 Jan 2009, 02:41 PM
  4. Price calculation with attributes
    By Spectral in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 17 Oct 2006, 03:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg