Results 1 to 5 of 5

price calculation problem, where are the functions?

This is a discussion on price calculation problem, where are the functions? within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hi I have a specifig calculation for price, but I don't know which function is the main one for doing ...

      
  1. #1
    New Member
    Join Date
    Jun 2004
    Posts
    9
    Rep Power
    0


    Default price calculation problem, where are the functions?

    Hi
    I have a specifig calculation for price, but I don't know which function is the main one for doing so.

    this is my calculation.

    Every pair itemscost $200
    every single item costs $125

    so if customer buys 5 items, total will be 200 +200 + 125
    this is the rule and price for all products on my shop, because I have only one kind of product for sale!!

    I know how to do the calculation, but i do not know what variable and function I should assign the sum.

    Also, because my shop has only ONE product, I can hard code this permanently inside codes. The problem is where and what file and what function is the main price calculation.

    also tax option will be disable. so no worry about that.

    Can anybody help on this?

    Thanks
    Nav

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default

    So the price is more like

    1-125 (odd)
    add 1 more-add another 75 (even)
    add 1 more-add another 125 (odd)
    add 1 more-add another 75 (even)
    add 1 more-add another 125 (odd)
    add 1 more-add another 75 (even)
    etc...

    Or better yet Price is:

    If Qty = Even
    price = Qty x $100

    If Qty = Odd
    price = Qty x $100 +$25



    Should not be too hard to hard code it - Ugly as heck

    Try looking at:
    http://www.oscommerce.com/community/contributions,1242
    Quantity Price Breaks Per Product

    or
    http://www.oscommerce.com/community/contributions,1700
    XPricesPerProduct

    These may be what your looking for - or atlease show you where you need to modify it to work the way you want.

    Good Luck!
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    New Member
    Join Date
    Jun 2004
    Posts
    9
    Rep Power
    0


    Default

    Hi jpf
    Thanks for your reply.
    yes, your formula is right, that is the way I want.

    I just looked at that contribution site. what is it about? are there other functions and add ons that we can select to add to our shopping cart?

    There are different down load, are this different codes people developed independet of each other?

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default

    Short answer:

    A: Contribution/Modification to exisiting "base code" of OSC

    B: Yes. To a point. (Some are for OLDER version or are simular fuction - but diffent process by differnt authors, some are duplicates)

    C: Yes.

    D: Yes.

    Longer answer:

    OSCommerce is an open source project and many people find diffent ways to thing (out of nessary or what if it could do this...). Some times it does not suit the way they want or they have special ways of doing thing than OSC does not do (and may not be applicalbe to be used for "ALL" people). They return the favor buy "contributing" BACK to the OPEN SOURCE COMMUNITY that gave them the orginal program. After all why reinvent the wheel every time some one wants a diffent color or size or because one of your neibours has one etc.

    Yes you can ADD these into your site - if you have a PLAIN version of OSC and add only one -then it should be easy - when you add 2 or more - that conflict with each other (they modify the same file or worse - the same code) then it gets harder.

    MS2-MAX has over 20 of these most common MODS already included. The largest change was the BTS mod (Basic Template System) changes the most files (over 62 files radically changed and added almost as many in the catalog side), which makes it a bit harder to add other contributions - BUT NOT IMPOSSABLE!


    Good Luck
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  5. #5
    Active Member red_fraggle's Avatar
    Join Date
    Feb 2004
    Location
    wilmington, NC
    Posts
    343
    Rep Power
    8


    Default

    If you need modification done, we will install ANY module at oscommerce.com's contribution section for $49.95. This includes the linkpoint payment gateway i helped write and currently provide free email and phone support for.

    Our standard rates for custom PHP Development are $40.00 per hour. There is nothing we can't do with OSC and OSC MAX

Similar Threads

  1. Shop by price infobox problem please help~
    By jikey in forum osCMax v2 Features Discussion
    Replies: 2
    Last Post: 11-26-2006, 02:14 AM
  2. Call For Price Problem
    By bkpie in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 07-27-2006, 06:04 PM
  3. Tax Calculation wrong with Attributes
    By ron54 in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 01-29-2005, 12:43 PM
  4. Price Problem
    By Chippy in forum osCMax v1.7 Installation
    Replies: 4
    Last Post: 07-16-2004, 11:49 PM
  5. need to change the price calculation for OSCommerce cart
    By navid in forum osCommerce 2.2 Modification Help
    Replies: 0
    Last Post: 06-23-2004, 02:53 PM

Bookmarks

Posting Permissions

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