normal Pdf in new window

More
11 years 3 months ago #3481 by Mario González
The question I have is about PDF creation on product page. When I press a small pdf icon pdf opens in the same window, I want it open in new window.

I tried, but I can not find how to get it.

Please Log in or Create an account to join the conversation.

More

Notice: Undefined variable: end_tag_params in /home/omegatheme/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321

Notice: Undefined variable: end_tag_params in /home/omegatheme/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321

Notice: Undefined variable: end_tag_params in /home/omegatheme/public_html/libraries/kunena/External/Nbbc/src/BBCode.php on line 2321
11 years 3 months ago - 11 years 3 months ago #3500 by Trung Duong
Replied by Trung Duong on topic Re: Pdf in new window
Hello,

It's from VM core, you can edit that function as below(components/com_virtuemart/helpers/vmview.php):
Code:
class VmView extends JView{ function linkIcon($link,$altText ='',$boutonName,$verifyConfigValue=false, $modal = true, $use_icon=true,$use_text=false){ if ($verifyConfigValue) { if ( !VmConfig::get($verifyConfigValue, 0) ) return ''; } $folder = (JVM_VERSION===1) ? '/images/M_images/' : '/media/system/images/'; $text=''; if ( $use_icon ) $text .= JHtml::_('image.site', $boutonName.'.png', $folder, null, null, JText::_($altText)); if ( $use_text ) $text .= '&nbsp;'. JText::_($altText); if ( $text=='' ) $text .= '&nbsp;'. JText::_($altText); if ($modal) return '<a class="modal" rel="{handler: \'iframe\', size: {x: 700, y: 550}}" title="'. JText::_($altText).'" href="'.JRoute::_($link).'">'.$text.'</a>'; else return '<a title="'. JText::_($altText).'" href="'.JRoute::_($link).'">'.$text.'</a>'; } }

Change to this
Code:
class VmView extends JView{ function linkIcon($link,$altText ='',$boutonName,$verifyConfigValue=false, $modal = true, $use_icon=true,$use_text=false){ if ($verifyConfigValue) { if ( !VmConfig::get($verifyConfigValue, 0) ) return ''; } $folder = (JVM_VERSION===1) ? '/images/M_images/' : '/media/system/images/'; $text=''; if ( $use_icon ) $text .= JHtml::_('image.site', $boutonName.'.png', $folder, null, null, JText::_($altText)); if ( $use_text ) $text .= '&nbsp;'. JText::_($altText); if ( $text=='' ) $text .= '&nbsp;'. JText::_($altText); if ($modal) return '<a target="_blank" class="modal" rel="{handler: \'iframe\', size: {x: 700, y: 550}}" title="'. JText::_($altText).'" href="'.JRoute::_($link).'">'.$text.'</a>'; else return '<a title="'. JText::_($altText).'" href="'.JRoute::_($link).'" target="_blank">'.$text.'</a>'; } }

Thanks

Support email: services(at)omegatheme(dot)com


Follow Us to keep updated!

[img


[img


[img]...[/img]

[img]...[/img]

[img]...[/img]
Last edit: 11 years 3 months ago by Trung Duong.

Please Log in or Create an account to join the conversation.

More
11 years 2 months ago #3524 by Mario González
Thank you very much, it works perfectly.

Please Log in or Create an account to join the conversation.

Time to create page: 0.261 seconds

About Growth

Innovative tech for eCommerce growth

Contact Info

Head: No. 3, 175/55 Lane, Lac Long Quan St., Nghia Do Ward, Cau Giay District, Hanoi City, Vietnam