View Single Post
  #1  
Old 03-29-2008, 07:04 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default [PATCH] Properly reorder Product_Options variants

Product Options have the ability to be ordered, but this ordering isn't passed on to Variants. This is a failing in Qualiteam code logic, as Variants are an extension of Product Options, and thus should carry the same ordering value as it's related Option.

I've fixed this problem, attached is a diff which should apply on 4.1.8/4.1.9. I believe a better fix would be to rewrite the query used that establishes the first variants array (I would personally use INNER JOIN between xcart_variants, xcart_variant_items, and xcart_class_options, and then use the xcart_class_options.orderby value to order), but I didn't want to affect the pricing and whatnot that is being pulled into the original $variants array.

Result is that instead of Variants being ordered by name, they'll be ordered by the Order By value of each variant's related Option.

This affects modules/Product_Options/func.php, diff is attached in zip file

To apply the diff (aka patch), you must use the Patch/Upgrade mechanism in X-Cart administration.

Cheers
Attached Files
File Type: zip properly_reorder_variants_4.1.x_Product_Options.zip (901 Bytes, 898 views)
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote