{"id":311,"date":"2010-05-19T21:30:40","date_gmt":"2010-05-19T19:30:40","guid":{"rendered":"http:\/\/kavdesign.net\/blog\/?p=311"},"modified":"2010-05-23T11:46:10","modified_gmt":"2010-05-23T09:46:10","slug":"how-to-add-additional-field-for-image-in-joomla-virtuemart-manufacturer-page","status":"publish","type":"post","link":"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-add-additional-field-for-image-in-joomla-virtuemart-manufacturer-page\/","title":{"rendered":"How to add additional field for an image in Joomla VirtueMart Manufacturer page?"},"content":{"rendered":"<p>Steps:<\/p>\n<p><strong>1.<\/strong> Open phpMyAdmin and add the additional field to the <strong>jos_vm_manufacturer:<\/strong><\/p>\n<p><code>ALTER  TABLE  `jos_vm_manufacturer`  ADD  `mf_image` TEXT CHARACTER  SET utf8 COLLATE utf8_general_ci NULL  AFTER  `mf_desc` <\/code><\/p>\n<p><strong>2.<\/strong> Open<strong> manufacturer.manufacturer_form.php <\/strong>and add additional row for the new field:<br \/>\n<code><br \/>\n&lt;tr&gt;<br \/>\n&lt;td width=\"22%\" align=\"right\"\u00a0 valign=\"top\"&gt;&lt;br\/&gt;&lt;br\/&gt;Image:&lt;\/td&gt;<br \/>\n&lt;td width=\"78%\" &gt;&lt;br\/&gt;&lt;br\/&gt;&lt;?php<br \/>\neditorArea( 'editor2', $db-&gt;f(\"mf_image\"), 'mf_image', '300', '150', '70', '25' )<br \/>\n?&gt;&lt;\/td&gt;<br \/>\n&lt;\/tr&gt;<br \/>\n<\/code><\/p>\n<p><strong>3.<\/strong> Open <strong>ps_manufacturer.php<\/strong> and add the new field to the add and update functions the same way like the field mf_desc is added (just copy the line and add a new row after but for mf_image)<\/p>\n<p><strong>4.<\/strong> Open <strong>shop.manufacturer_page.php<\/strong> and do the same like in the previous step also don&#8217;t forget to add mf_image in the select statement for the database<\/p>\n<p><strong>5.<\/strong> If needed add the new field in the <strong>shop.manufacturer.tpl.php<\/strong><\/p>\n<p><strong>6.<\/strong> Open<strong> shop.browse.php<\/strong> and add:<\/p>\n<p><code>$browsepage_lbltext = $db-&gt;f(\"mf_image\");<br \/>\n$tpl-&gt;set( 'browsepage_lblimage', $browsepage_lblimage );<\/code><\/p>\n<p>After:<\/p>\n<p><code>$browsepage_lbltext = $db-&gt;f(\"mf_desc\");<br \/>\n$tpl-&gt;set( 'browsepage_lbltext', $browsepage_lbltext );<\/code><\/p>\n<p>Also here don&#8217;t forget to add the mf_image into the select statement above.<\/p>\n<p><strong>7.<\/strong> Then edit the <strong>browse_header_manufacturer.tpl.php<\/strong> add a field like <strong>$browsepage_lbltext<\/strong> but for the image<\/p>\n<p>This is it&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Steps: 1. Open phpMyAdmin and add the additional field to the jos_vm_manufacturer: ALTER TABLE `jos_vm_manufacturer` ADD `mf_image` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL AFTER&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/www.kavdesign.net\/blog\/coding\/how-to-add-additional-field-for-image-in-joomla-virtuemart-manufacturer-page\/\">Continue reading<span class=\"screen-reader-text\">How to add additional field for an image in Joomla VirtueMart Manufacturer page?<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","_links_to":"","_links_to_target":""},"categories":[9,29],"tags":[69,54,33],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-coding","category-joomla","tag-image","tag-manufacturer","tag-virtuemart","entry"],"_links":{"self":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/311","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/comments?post=311"}],"version-history":[{"count":6,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":315,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/posts\/311\/revisions\/315"}],"wp:attachment":[{"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kavdesign.net\/blog\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}