osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Problem with products attributes

This is a discussion on Problem with products attributes within the osCommerce 2.2 Modification Help forums, part of the osCommerce 2.2 Forums category; Hello, I have got a problem with products attributes. In OSC it's very easy to create sth like that: product ...


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 09-21-2004, 02:52 PM
Lurker
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
markospl
Default Problem with products attributes

Hello,

I have got a problem with products attributes.
In OSC it's very easy to create sth like that:

product prize: 10.00$
products attributes (size):
medium
small (-2.00$)
large (+2.00$)
And it works fine (small costs 8$, medium 10$ and large 12$)

Now, I would like to get sth like that:
product prize: 10.00$
products attributes (size):
small (8.00$)
medium (10.00$)
large (12.00$)

Is it possible to do that in OSC (I just want to avoid prefixes)??

Greetz, markospl
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 09-22-2004, 06:11 AM
Member
 
Join Date: Aug 2004
Posts: 41
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
wenzlerpaul
Default

Hi Markospl,

First thing to do is backup, backup and backup!

open product_info.php and locate this code approx line 137;

Code:
          if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
          }
then change it to


Code:
//here is the edited code
	    if ($products_options['price_prefix'] == '+'){
	    $real_price = ($product_info['products_price']) + ($products_options['options_values_price']);
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	    }else{
	    $real_price = ($product_info['products_price']) - ($products_options['options_values_price']);
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	    }
// end of code
This will make the thing you want, you can play around it till you get the feel you want.

Hope it helps,

Paul
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 09-24-2005, 05:24 PM
Lurker
 
Join Date: Sep 2005
Posts: 3
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
ktweezee
Default

Quote:
Originally Posted by wenzlerpaul
Hi Markospl,

First thing to do is backup, backup and backup!

open product_info.php and locate this code approx line 137;

Code:
          if ($products_options['options_values_price'] != '0') {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
          }
then change it to


Code:
//here is the edited code
	    if ($products_options['price_prefix'] == '+'){
	    $real_price = ($product_info['products_price']) + ($products_options['options_values_price']);
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	    }else{
	    $real_price = ($product_info['products_price']) - ($products_options['options_values_price']);
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $currencies->display_price($real_price, tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
	    }
// end of code
This will make the thing you want, you can play around it till you get the feel you want.

Hope it helps,

Paul
so awesome, thanks so much for this mod
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Products / Attributes and Inventory Controll stevel osCMax v1.7 Discussion 1 01-11-2005 07:18 PM
Products Attributes - drop-down menu for product selection SuperPickle osCommerce 2.2 Modification Help 0 10-11-2004 09:24 PM
Lots of Products all with the same attributes. JGofGFS osCommerce 2.2 Modification Help 0 05-04-2004 08:55 AM
Problems with Adding Products and Attributes mafunk osCommerce 2.2 Modification Help 1 11-03-2003 08:16 PM
Products with multiple attributes - one depends on the other geoff-uklinux osCommerce 2.2 Modification Help 2 10-24-2003 05:00 AM


All times are GMT -8. The time now is 08:37 AM.


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