News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Get content from custom fields [SOLVED]

Started by fabioweb, June 16, 2020, 22:27:15 PM

Previous topic - Next topic

fabioweb

Hello with V.M. 3.8.2 i have this code in product details
$linkVideo = shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'videobreve'));
and the output of echo $linkVideo custom field is

<div class="product-fields">
   <div class="product-field product-field-type-S">
   <div class="product-field-display">[b]https://www.ilgarofanorosa.com/video/ita.mp4[/b]</div>
    </div>
<div class="clear"></div>
</div>


My question is how can i have only the content of custom field ino order that
<a href="<?php echo $linkVideo"></a> will be only the link?

Thanks for help





pinochico

change sublayouts customfields by override in template or create new sublayout and change/call in $linkVideo
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

fabioweb

Wow perfect thanks! i want to share the final code for this
echo shopFunctionsF::renderVmSubLayout('customfields_link',array('product'=>$this->product,'position'=>'imparare'));
then i created customfields_link.php into sublayouts folder.

Best regards

pinochico

Wonderfull, that is exactly what i mean :)

Super
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

PRO

You dont need a separate file. You can have them separate in the customfields layout, by class , position etc.

http://forum.virtuemart.net/index.php?topic=128936.0