Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sequencing Attributes


Peter M

Recommended Posts

Posted

Hi All,

 

I am having a bit of bother with attributes and I wonder if anyone has a solution for me.

 

I am new to PHP but used to use SQL allot on the good old AS/400 a few years ago, so I am not too bad with SQL, but not in a mySQL environment.

 

I have been looking at a problem I have for a couple of days now, I could do a quick and dirty fix, but what I really need is a long term resolution.

 

I look after an osCommerce site which sells clothing, which of course has sizes ranging usually from S to 3XL and in some cases 30/32" to 42/44", therein lies the problem.

 

For some reason which as yet escapes me, the attribute_sort column in the products_attributes table is out of sequence, so the sizes are not displayed in logical sequence when selected on the product.

 

What I need is a little PHP program to reset the sequence number of attribute_sort starting at 1 and incrementing by 1 using the products_options_values_name in the products_options_values table as the correct sequence. This needs to also pick up the products_name in the products_description table as distinct so it will process each product in turn and in a logical sequence.

 

The other thing, is depending on how many product updates take place, this may need to be run fairly frequently, also some products have multiple attributes, I think no one single product has more than 10 though.

 

Does anyone have any ideas, or could I be really cheeky and ask someone to knock up a little PHP program to do this for me?

 

Thanks in advance,

Peter.

Posted

Hi All,

 

Having looked at this in more detail now, it is clear that where there are both alpha and numerical sizes in the products_options_values_name column, the sequencing goes to pot, so more thought needed there!

 

In the mean time, what I think I may now need is a manual way of editing the attribute_sort in a spreadsheet like table of all attributes by product.

 

Is there an existing method of downloading this sort of information and playing with it in excel?

 

Thanks again in advance,

Peter.

Archived

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

×
×
  • Create New...