Page 1 of 1

VQMod Product Option Value Sort Order

Posted: Tue Oct 16, 2012 9:14 pm
by cleartechsolutions
Hello.

I was wondering whether anyone knew about a VQMod that would allow us to set a sort order for product option values for example

I have a 3, 7 and 12 Pack of items and in the dropdown box they are shown in the following order

12
3
7

Now i would either like these show in numerical order i.e. 3,7,12 or an option to sort the order of each item based on a per product basis.

Thank you.

P.S. I have searched the extensions models, the only one close was the Alphabetical Options Order (But i am not sure whether this will work for Numerical.

Re: VQMod Product Option Value Sort Order

Posted: Thu Nov 01, 2012 10:53 am
by easistudio
Just realised that vQmod is limited to single lines. The below does work (well on 1.5.4.1 anyhow) and sets the default order to Model if that is any help?

Code: Select all

<modification>
	<id><![CDATA[Change Default Sort Order To Model]]></id>
	<version><![CDATA[1.00]]></version>
	<vqmver><![CDATA[2.20]]></vqmver>
	<author><![CDATA[EasiStudio]]></author>
	<file name="catalog/controller/product/category.php">
		<operation>
			<search position="replace"><![CDATA[$sort = 'p.sort_order';]]></search>
			<add><![CDATA[$sort = 'p.model';]]></add>
		</operation>
	</file>
</modification>