In VirtueMart 3.0.4 how can I reorder the position of Cart Varient and Custom Fields in the addtocart "Layout position"?
I cannot find any way to place these cart variant and custom fields in a specific order on the product details page.
Is there a way to do that?
Try to ordering them in the custom field list.
Kind regards,
Bluezeyes
Custom Field List doesn't allow any reordering?
Hi,
I have VM2.6.14 but had the same problem and was able to solve it.
It is a bug in VM, maybe it is still in VM3.
It is function getProductCustomsFieldCart from administrator/components/com_virtuemart/models/customfields.php.
Around line 821 you find
// group by virtuemart_custom_id
$query = 'SELECT C.`virtuemart_custom_id`, `custom_title`, `show_title`, C.`custom_value`,`custom_field_desc` ,`custom_tip`,`field_type`,field.`virtuemart_customfield_id`,`is_hidden`
FROM `#__virtuemart_customs` AS C
LEFT JOIN `#__virtuemart_product_customfields` AS field ON C.`virtuemart_custom_id` = field.`virtuemart_custom_id`
Where `virtuemart_product_id` =' . (int)$product->virtuemart_product_id . ' and `field_type` != "G" and `field_type` != "R" and `field_type` != "Z"';
$query .= ' and is_cart_attribute = 1 group by virtuemart_custom_id ORDER BY field.`ordering`';
You only need to change the last row.
ORDER BY field.`ordering`
should be
ORDER BY C.`ordering`
It was first sorting on custom option level, not on custom level itself.
That solves the problem for me. Now its a hack, but maybe should solved in next version ;)
Niels
I am using;
Virtuemart 3.0.8
Joomla 3.4.3
In Custom Fields, there is drag/drop ordering, but it seems a bit wonky. Upon saving, sometimes it saves OK & other times not.
If I go into each custom field manually and set the order number, this then shows in the back end as being ordered OK,
But in the front end, on a product page showing some String Custom Fields, the ordering is random, even after clearing all site & Browser cache.
Is there a bug/problem with ordering custom fields this way?
If not can anyone point me in the right direction of solving this.
Thanks
Andy
http://forum.virtuemart.net/index.php?topic=130799.msg450754#msg450754