This is the sollution: http://forum.virtuemart.net/index.php?topic=66513.0
Welcome to our blog! Here you can find stuff about web development, software engineering, WordPress & about our projects and interests.
This is the sollution: http://forum.virtuemart.net/index.php?topic=66513.0
One way to remove the text “View Full-Size Image” from beneath your product thumbnail on your flypage, make a copy of, then edit this file:
components/com_virtuemart/themes/your_theme/theme.php
Find the function vmBuildFullImageLink and within that find this line:
$text = ps_product::image_tag($product['product_thumb_image'], $img_attributes, 0)."<br/>".$VM_LANG->_('PHPSHOP_FLYPAGE_ENLARGE_IMAGE');
Change it so it looks like this:
$text = ps_product::image_tag($product['product_thumb_image'], $img_attributes, 0);
Save and test.
Another method would be to clear out the ‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’ text in your langauge file.
There a few tricks to get this working for your online store with Joomla.
1. Make sure you have installed Virtuemart 1.1.4 and Joomfish 2.0.4 over Joomla 1.5.20 (it should work with any 1.5 version). System Legacy plugin should be on.
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 `mf_desc`
2. Open manufacturer.manufacturer_form.php and add additional row for the new field:
<tr>
<td width="22%" align="right" valign="top"><br/><br/>Image:</td>
<td width="78%" ><br/><br/><?php
editorArea( 'editor2', $db->f("mf_image"), 'mf_image', '300', '150', '70', '25' )
?></td>
</tr>
3. Open ps_manufacturer.php 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)
4. Open shop.manufacturer_page.php and do the same like in the previous step also don’t forget to add mf_image in the select statement for the database
5. If needed add the new field in the shop.manufacturer.tpl.php
6. Open shop.browse.php and add:
$browsepage_lbltext = $db->f("mf_image");
$tpl->set( 'browsepage_lblimage', $browsepage_lblimage );
After:
$browsepage_lbltext = $db->f("mf_desc");
$tpl->set( 'browsepage_lbltext', $browsepage_lbltext );
Also here don’t forget to add the mf_image into the select statement above.
7. Then edit the browse_header_manufacturer.tpl.php add a field like $browsepage_lbltext but for the image
This is it…
There is a filter in VirtueMart, which cuts the object and the embed html tags.
A modification should be completed in the administrator/components/com_virtuemart/classes/phpInputFilter/class.inputfilter.php file.
In order to embed YouTube video and other Flash files in your VirtueMart product description area you should remove the object and the embed items from the following array:
var $tagBlacklist = array(‘applet’, ‘body’, ‘bgsound’, ‘base’, ‘basefont’, ’embed’, ‘frame’, ‘frameset’, ‘head’, ‘html’, ‘id’, ‘iframe’, ‘ilayer’, ‘layer’, ‘link’, ‘meta’, ‘name’, ‘object’, ‘script’, ‘style’, ‘title’, ‘xml’);
The new array will be:
var $tagBlacklist = array(‘applet’, ‘body’, ‘bgsound’, ‘base’, ‘basefont’, ‘frame’, ‘frameset’, ‘head’, ‘html’, ‘id’, ‘iframe’, ‘ilayer’, ‘layer’, ‘link’, ‘meta’, ‘name’, ‘script’, ‘style’, ‘title’, ‘xml’);
VirtueMart supports Manufacturer details but by default it just shows the manufacturer’s name in brackets, with a javascript pop-up window, that looks pretty ugly.
Fortunately we can add the logo by using the description field of the Manufacturers details and by hacking one file.
The following is tested and works for VirtueMart 1.1.3 and 1.1.4
So, open /administrator/components/com_virtuemart/html/shop.product_details.php
First of all, let’s open these three files first:
- shop.browse.php in /administrator/components/com_virtuemart/html/shop.browse.php
- ps_product.php (Open this for explanation purpose)
- browse_1.php (The browse page in which your browse page is using)
To do this first read this post:
where it is explained: How to hack Manufacture Name in Virtuemart Browse Page Template?
Then step by step explanation:
1. open your: ps_product.php
and add this function:
/**
* Functon to get the id of the manufacturer this product is assigned to
*
* @param int $product_id
* @return string the manufacturer id
*/
function get_mf_id($product_id) {
$db = new ps_DB;
$q = “SELECT mf_name,#__{vm}_manufacturer.manufacturer_id FROM #__{vm}_product_mf_xref,#__{vm}_manufacturer “;
$q .= “WHERE product_id=’$product_id’ “;
$q .= “AND #__{vm}_manufacturer.manufacturer_id=#__{vm}_product_mf_xref.manufacturer_id”;
$db->query($q);
$db->next_record();
if ($db->f(“manufacturer_id”)) {
return $db->f(“manufacturer_id”);
}
else {
return “”;
}
}
2. Then open shop.browse.php and add this lines:
$mf_id = $ps_product->get_mf_id( $db_browse->f(‘product_id’) );
$tpl->set( ‘mf_id’, $mf_id );
after:
//The Code below is written by Andy Ng < Andy@PCinvent.infoThis e-mail address is being protected from spam bots, you need JavaScript enabled to view it >
//Please keep the above author credit line
$mf_name = $ps_product->get_mf_name( $db_browse->f(‘product_id’) );
$tpl->set(‘mf_name’,$mf_name);
3. Add this line in shop.browse.php:
$products[$i][‘manufacturer_id’] = $mf_id;
somewhere after:
$products[$i][‘cdate’] = $VM_LANG->convert( vmFormatDate($db_browse->f(“cdate”), $VM_LANG->_(‘DATE_FORMAT_LC’) ));
$products[$i][‘mdate’] = $VM_LANG->convert( vmFormatDate($db_browse->f(“mdate”), $VM_LANG->_(‘DATE_FORMAT_LC’) ));
$products[$i][‘product_url’] = $db_browse->f(“product_url”);
4. Add thil core into your browse page:
<a href=”<?php echo $sess->url( URL.”index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=”. $manufacturer_id ) ?>”>
<?php echo $mf_name; ?>
</a>
that should be it.
It works for VM 1.1.2