Hello.
There is a multivendor shop Virtuemart 3.0.16. It is necessary to display the name of shop of the seller on the product page. However there is no such variable on this page, only virtuemart_vendor_id, and vendor_store_name is necessary. Prompt how to add this variable on the page. I have understood that it must be done in the file:
components/com_virtuemart/views/productdetails/view.html.php
But here where there and as I can't make it to understand.
Thanks.
VirtueMart v3.0.16
Joomla v3.5.1
PHP v5.3.29
no - over ride components/com_virtuemart/views/productdetails/tmp/default.php
if the vendor name isn't in the object then use the vendor_id and a small DB query snippet to get the name from #__virtuemart_vendors
Please, tell me how did a small DB query snippet to get the name from #__virtuemart_vendors?
well.. google would be faster than posting here.. but anyway
something like
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('vendor_name'));
$query->from($db->quoteName('#__virtuemart_vendors'));
$query->where($db->quoteName('virtuemart_vendor_id') . ' = '. $db->quote($this->virtuemart_vendor_id'));
$db->setQuery($query);
$vendor_name = $db->loadResult();