Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Calculating Square meter/feet area????


Guest

Recommended Posts

Does anybody know how I can have osC calculate total square meter or feet. I have a printing company selling banners, posters etc. We sell most of the products by square area (1sq. foot = $10)

 

I had the following order process in mind.

 

1) He would like to purchase a banner for an upcoming golf-day.

2) He would like the banner to be 1.5m x 2.3m in size.

3) He would select the banner product

4) This would take him to a size page

5) He would then enter the size in two different fields, one length and one width

6) The store software would then calculate the area as per the example above.

7) The store would then out-put a price, place in the basket ready for purchase. (3.45m square x (pre-determined price of $10) = $345

 

I would settle for maybe the following: Giving the customer two pre-set fields of sizes (one length and one width). These fields could represent sizes in half meter/foot increments, so then the customer would select from field one: 1.5m (assuming I increment in half meter steps) and in field two: 2.5m (the next closest available option)

 

Any ideas. I'M NO PROGRAMMING EXPERT, SO GO SLOW WITH THE EXPLANATIONS IF YOU DON'T MIND.

 

 

Thanks!!

 

Stephen

Link to comment
Share on other sites

  • 6 months later...
  • 4 years later...

Take a look here, maybe it's this what you mean

 

Explanation:

 

1) there are 4 attributes as input fields (among other attributes) where customer enter the number of sheets he want

2) The input value is getting multiplied by the attribute price

3) The total of sheets (total of values of the 4 input fields) is multiplied by some of the options (don't remember now what options)

4) Each multiplication result gives a final attribute price that is multiplied by the quantity

 

Add an item to the cart, it display the calculation

 

To do this I had to

1) Install option types

2) Modify file classes/shopping_cart.php and added manually any multiplications needed using the options_id (in 2 functions calculate() and attribute_price()) and then replaced the default attribute price by my multiplication result.

3) modify file shopping_cart.php for the display only (not important for calculation)

Link to comment
Share on other sites

 

2) Modify file classes/shopping_cart.php and added manually any multiplications needed using the options_id (in 2 functions calculate() and attribute_price()) and then replaced the default attribute price by my multiplication result.

 

 

thanks multimixer,

 

This is what i'm looking for, can you paste the code of the functions calculate() and attribute_price()?

 

 

thanks again for your help.

Link to comment
Share on other sites

  • 10 months later...

does anybofy have a contirb on hand where we can calu

There is a commercial add on available for this if you search for it.

 

 

 

 

Chris

 

pls sent me this link my pm i was at your side but could not find it

did you also offer a install serivce?

rgds

alfred

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...