osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

New Fields for Product Info...

This is a discussion on New Fields for Product Info... within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; I am currently working on a website that will contain nothing but clearanced items from the owner's other websites. Right ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Modification Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 10-09-2003, 01:14 AM
New Member
 
Join Date: Oct 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
naclu
Default New Fields for Product Info...

I am currently working on a website that will contain nothing but clearanced items from the owner's other websites.

Right now, I am currently entering some html code in all of the product descriptions to change the font colors and boldness to show:

Regular Price: xx.xx
Clearance Price: xx.xx
You Save: xx.xx


I am interested in adding new fields to the product category in the database in order to expedite this process a little bit, since I am constantly adding new items to the site. BUT I NEED HELP PLEASE!

I know that the new fields need to be added to the database (MySQL), but I'm not really sure which table and I don't know how to make them show up in the site admin page or on the website. It would be nice to have it automatically calculate the difference for me, but I'm not that picky.

Does anyone have any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 10-09-2003, 07:55 AM
Stu Stu is offline
New Member
 
Join Date: Oct 2003
Posts: 5
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
Stu
Default

You could just put everything on special which would take care of the original / clearance price and then you could just do some quick math in the product info page to subtract the difference between the two and figure the percentage savings. Then it's just a matter of formatting the necessary pages.

Something like:


Quote:
$savings = ($product_info['products_price']) - $new_price;
$percent_savings = ($savings / $product_info['products_price']) * 100;

$products_price = 'Regular Price: <s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <br><span class="productSpecialPrice">Clearance Price: ' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '<br>You Save: <i>' . round($percent_savings) . '%!</i></span>';
It's not clean code but I hope it gives you a start. If you want a dollar figure instead of a percentage, just substitute $savings for the round($percent_savings) bit. That $product_price line is just 1 line but could easily be broken up to make it more readable.

Stu
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 10-09-2003, 08:31 AM
New Member
 
Join Date: Oct 2003
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
naclu
Default

Thanks for your response...

I actually did think about that because I loved the strike through feature. The problem is that we have just enough parts to be too many to throw them all in there and I didn't see (although I may have overlooked) a way to create subcategories under the specials.

But the code will be helpful... Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
can osCMax v2 do custom product fields? chint osCMax v1.7 Discussion 11 07-26-2005 09:42 AM
Custom Product Fields ryanmhubbard osCMax v1.7 Discussion 0 09-10-2004 04:23 PM
Additional Product Fields... RichRodgers.net osCommerce 2.2 Modification Help 1 05-15-2004 05:46 PM
Product Info Layout Changes, Add Fields To Database To Displ Mibble osCommerce 2.2 Modification Help 2 01-28-2004 10:33 AM
new product text fields Rodland osCommerce 2.2 Modification Help 2 04-11-2003 03:29 PM


All times are GMT -8. The time now is 04:23 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax