osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

product attribute question

This is a discussion on product attribute question within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; If I set a few attributes using radio boxes, what determines what order they display? I want a particular option ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 12-23-2004, 08:51 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default product attribute question

If I set a few attributes using radio boxes, what determines what order they display? I want a particular option to be the default, and if they want differently they can choose.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 12-23-2004, 09:02 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,505
Thanks: 74
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: product attribute question

See this:

http://oscdox.com/index.php?name=PNp...der+attributes
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 12-23-2004, 09:42 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default Re: RE: product attribute question

I read through that, and catalog/product_info.php doesn't contain the code they're talking about? Are they referring to base MS2 code? Sorry, I'm still new to hacking all this in...getting better through. If I figure this out I'll toss it in the wiki.

Thanks,

Greg

Quote:
Originally Posted by msasek
Quote:
Originally Posted by gameparts
I Found It! It was listed on another support site:

Sort Product Options (attributes)

What it does...
First - sorts by price
Second - if price is same (or 0), it sorts based on the order that the option was entered.

File to change ...
/catalog/product_info.php
********************************************

Replace this line
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");


With this line
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.options_values_price, pa.products_attributes_id");


OR.......

If you want to sort solely by the order the option was entered (regardless of price) instead use this:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'" . " order by pa.products_attributes_id");
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 12-23-2004, 10:06 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default RE: Re: RE: product attribute question

Oh cool, got it.

I forgot that most of what can normally be found in the catalog directory will be found in your template/content directory. That was the case this time and it was as simply as replacing the code as directed.

If you want to see it in action, look at the flag>full size section of my website at www.upupandawaykites.com . Every flag there has 2 attributes. The 'just the flag' should be the first one everywhere.

On just a fun note, look at the videos on the power blast 4-8 under kites>quad kites. THey're pretty cool. Big powerful kite, lol.

Thanks for all the help. Its really appreciated. This whole website thing is going so smoothly for me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 12-23-2004, 10:17 AM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,505
Thanks: 74
Thanked 334 Times in 313 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Re: RE: product attribute question

Remember that osCMax uses BTS, so the changes will be in :

/templates/[templatename]/content/product_info.tpl.php

I thought you knew that, since you have been working with osCMax for a while now. Any time you see a mod to a file in the base catalog dir, 99.9% of the time, it will be in the /content template of the same name. There are a few small exceptions, but it is rare.
__________________
Michael Sasek
osCMax Developer


  • osCMax Templates - Hundreds of premium quality templates. New designs every month!

  • xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience.

  • osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

  • osCMax Template Tutorial - Learn how to make your own custom templates and how to use the powerful features of the osCMax template system.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 12-23-2004, 10:23 AM
Active Member
 
Join Date: Oct 2004
Posts: 215
Thanks: 0
Thanked 2 Times in 2 Posts
Rep Power: 5
groggory
Default Re: RE: Re: RE: product attribute question

Quote:
Originally Posted by msasek
Remember that osCMax uses BTS, so the changes will be in :

/templates/[templatename]/content/product_info.tpl.php

I thought you knew that, since you have been working with osCMax for a while now. Any time you see a mod to a file in the base catalog dir, 99.9% of the time, it will be in the /content template of the same name. There are a few small exceptions, but it is rare.
I just had a brain fart. I don't know why I forgot that. I just blindly followed the instructions. But about 2 mins after I posted my last question, I remember, hacked it in, and you replied to me while I was typign my last response.

I got a couple books on PHP, and its making alot more sense to me lately. The hundreds of files on OSC is all making sense. Its just all coming together. When I ask stupid questions, thank you for responding anyways. This community is so helpful and talented. I hope that I will be able to give back over time. Its really a great project.

Keep up the good work, and thank you!

Greg
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
Yet another attribute stock question landshark osCMax v2 Features Discussion 6 01-25-2006 04:31 AM
Yet another attribute stock level updating question kc_davis osCMax v2 Features Discussion 0 01-22-2006 08:50 PM
Delete product with attribute shopculture osCommerce 2.2 Discussion 3 07-14-2005 03:29 PM
product attribute text option question SkidMark osCMax v1.7 General Mods Discussion 5 04-29-2005 10:46 AM
product attribute help please BHenderson osCMax v1.7 Discussion 1 02-01-2005 10:24 AM


All times are GMT -8. The time now is 07:40 AM.


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