Sitemap by Xmap and Virtuemart's field 'modified_on'

Started by lysov, March 16, 2013, 12:06:06 PM

Previous topic - Next topic

lysov

Hello!
Site built using J!259, VM 2.0.18b and xmap 2.3.2. I checked out the site map through service http://webmaster.yandex.ru/sitemaptest.xml (map reference is http://www.litera.spb.ru/index.php?option=com_xmap&view=xml&tmpl=component&id=1) and found a number of errors. These errors are associated with an empty value of the field 'Last modification date', which looks like -0001-11-29T21:30:00Z
http://www.litera.spb.ru/catalog/preschool/prepare-fingers-for-the-letter/gotovim-palchiki-k-pismu-razvivae-melkuyu-motoriku-dlya-detej-6-7-let-ins -0001-11-29T21:30:00Z weekly 0.4
But values of the `modified_on` at VM table `#__virtuemart_products` are not empty! The error occurs in the VM function getProductSingle() when combined product with product prices: correct values of `modified_on` from `#__virtuemart_products` are replaced with empty values ​​for this field from the table `#__virtuemart_product_prices`!!!
When combining data sets at getProductSingle() it should be the maximum value of the field `modified_on`.

As a temporary patch should next update (it is not good way):
UPDATE  `yourprefix_virtuemart_product_prices` a,
`yourprefix_virtuemart_products` b SET a.`modified_on` = b.`modified_on` ,
a.`modified_by` = b.`modified_by` WHERE a.`modified_on` <  b.`modified_on` AND a.`virtuemart_product_id` = b.`virtuemart_product_id`