test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • michaldusek Friend
    #148837

    hello
    there is some problem. If i choose as flypage-images.tpl as default for showing product, there is only main image, but other images are not

    in vm default template it works, in zeolite not, somewhere is an error dont know where… still testing… could anyone help me?

    second answer: how can show detail text and images of manufacturer in detail page of product?

    thank you

    Saguaros Moderator
    #333261

    Hello guy!

    Please open the file: componentscom_virtuemartthemesja-zeolitetheme.php and find codes at 42 => 144
    [PHP]
    function vmBuildFullImageLink( $product ) {
    global $VM_LANG;

    $product_image = ”;

    $img_attributes= ‘alt=”‘.$product[‘product_name’].'”‘;

    /* Wrap the Image into an URL when applicable */
    if ( @$product[“product_url”] ) {
    $product_image = “<a href=””. $product[“product_url”].”” title=””.$product[‘product_name’].”” target=”_blank”>”;
    $product_image .= ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 0);
    $product_image .= “</a>”;
    }
    /* Show the Thumbnail with a Link to the full IMAGE */
    else {
    if( empty($product[‘product_full_image’] ) ) {
    $product_image = “<img src=””.VM_THEMEURL.’images/’.NO_IMAGE.”” alt=””.$product[‘product_name’].”” border=”0″ />”;
    }
    else {
    // file_exists doesn’t work on remote files,
    // so returns false on remote files
    // This should fix the “Long Page generation bug”
    if( file_exists( IMAGEPATH.’product/’.$product[‘product_full_image’] )) {

    /* Get image width and height */
    if( $image_info = @getimagesize(IMAGEPATH.’product/’.$product[‘product_full_image’] ) ) {
    $width = $image_info[0] + 20;
    $height = $image_info[1] + 20;
    }
    }
    else {
    $width = 640;
    $height= 480;
    }
    if( stristr( $product[‘product_full_image’], “http” ) ) {
    $imageurl = $product[‘product_full_image’];
    }
    else {
    $imageurl = IMAGEURL.’product/’.rawurlencode( $VM_LANG->convert($product[‘product_full_image’]));
    }
    /* Build the “See Bigger Image” Link */
    if( @$_REQUEST[‘output’] != “pdf” && $this->get_cfg(‘useLightBoxImages’, 1 ) ) {
    $link = $imageurl;
    $text = ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 1).”<br/>”.$VM_LANG->_(‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’);

    $product_image = vmCommonHTML::getLightboxImageLink( $link, $text, $product[‘product_name’], ‘product’.$product[‘product_id’] );
    }
    elseif( @$_REQUEST[‘output’] != “pdf” ) {
    $link = $imageurl;
    $text = ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 1).”<br/>”.$VM_LANG->_(‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’);
    // vmPopupLink can be found in: htmlTools.class.php
    $product_image = vmPopupLink( $link, $text, $width, $height );
    }
    else {
    $product_image = “<a href=”$imageurl” target=”_blank”>”
    . ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 1)
    . “</a>”;
    }
    }
    }
    return $product_image;
    }

    /**
    * Builds a list of all additional images
    *
    * @param int $product_id
    * @param array $images
    * @return string
    */
    function vmlistAdditionalImages( $product_id, $images, $title=”, $limit=1000 ) {
    global $sess;
    $html = ”;
    $i = 0;
    foreach( $images as $image ) {
    $thumbtag = ps_product::image_tag( $image->file_name, ‘class=”browseProductImage”‘, 1, ‘product’, $image->file_image_thumb_height, $image->file_image_thumb_width );
    $fulladdress = $sess->url( ‘index2.php?page=shop.view_images&image_id=’.$image->file_id.’&product_id=’.$product_id.’&pop=1′ );

    if( $this->get_cfg(‘useLightBoxImages’, 1 )) {
    $html .= vmCommonHTML::getLightboxImageLink( $image->file_url, $thumbtag, $title ? $title : $image->file_title, ‘product’.$product_id );
    }
    else {
    $html .= vmPopupLink( $fulladdress, $thumbtag, 640, 550 );
    }

    if( ++$i > $limit ) break;
    }
    return $html;
    }
    /**
    * Builds the “more images” link
    *
    * @param array $images
    */
    function vmMoreImagesLink( $images ) {
    global $mosConfig_live_site, $VM_LANG, $sess;
    /* Build the JavaScript Link */
    $url = $sess->url( “index2.php?page=shop.view_images&flypage=”.@$_REQUEST[‘flypage’].”&product_id=”.@$_REQUEST[‘product_id’].”&category_id=”.@$_REQUEST[‘category_id’].”&pop=1″ );
    $text = $VM_LANG->_(‘PHPSHOP_MORE_IMAGES’).'(‘.count($images).’)’;
    $image = vmCommonHTML::imageTag( VM_THEMEURL.’images/more_images.png’, $text, ”, ’16’, ’16’ );

    return vmPopupLink( $url, $image.'<br />’.$text, 640, 550, ‘_blank’, ”, ‘screenX=100,screenY=100’ );
    }
    [/PHP]

    Replace:
    [PHP]
    function vmBuildFullImageLink( $product ) {
    global $VM_LANG;

    $product_image = ”;

    $img_attributes= ‘alt=”‘.$product[‘product_name’].'”‘;

    /* Wrap the Image into an URL when applicable */
    if ( @$product[“product_url”] ) {
    $product_image = “<a href=””. $product[“product_url”].”” title=””.$product[‘product_name’].”” target=”_blank”>”;
    $product_image .= ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 0);
    $product_image .= “</a>”;
    }
    /* Show the Thumbnail with a Link to the full IMAGE */
    else {
    if( empty($product[‘product_full_image’] ) ) {
    $product_image = “<img src=””.VM_THEMEURL.’images/’.NO_IMAGE.”” alt=””.$product[‘product_name’].”” border=”0″ />”;
    }
    else {
    // file_exists doesn’t work on remote files,
    // so returns false on remote files
    // This should fix the “Long Page generation bug”
    if( file_exists( IMAGEPATH.’product/’.$product[‘product_full_image’] )) {

    /* Get image width and height */
    if( $image_info = @getimagesize(IMAGEPATH.’product/’.$product[‘product_full_image’] ) ) {
    $width = $image_info[0] + 20;
    $height = $image_info[1] + 20;
    }
    }
    else {
    $width = 640;
    $height= 480;
    }
    if( stristr( $product[‘product_full_image’], “http” ) ) {
    $imageurl = $product[‘product_full_image’];
    }
    else {
    $imageurl = IMAGEURL.’product/’.rawurlencode( $VM_LANG->convert($product[‘product_full_image’]));
    }
    /* Build the “See Bigger Image” Link */
    if( @$_REQUEST[‘output’] != “pdf” && $this->get_cfg(‘useLightBoxImages’, 1 ) ) {
    $link = $imageurl;
    $text = ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 0).”<br/>”.$VM_LANG->_(‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’);

    $product_image = vmCommonHTML::getLightboxImageLink( $link, $text, $product[‘product_name’], ‘product’.$product[‘product_id’] );
    }
    elseif( @$_REQUEST[‘output’] != “pdf” ) {
    $link = $imageurl;
    $text = ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 0).”<br/>”.$VM_LANG->_(‘PHPSHOP_FLYPAGE_ENLARGE_IMAGE’);
    // vmPopupLink can be found in: htmlTools.class.php
    $product_image = vmPopupLink( $link, $text, $width, $height );
    }
    else {
    $product_image = “<a href=”$imageurl” target=”_blank”>”
    . ps_product::image_tag($product[‘product_thumb_image’], $img_attributes, 0)
    . “</a>”;
    }
    }
    }
    return $product_image;
    }

    /**
    * Builds a list of all additional images
    *
    * @param int $product_id
    * @param array $images
    * @return string
    */
    function vmlistAdditionalImages( $product_id, $images, $title=”, $limit=1000 ) {
    global $sess;
    $html = ”;
    $i = 0;
    foreach( $images as $image ) {
    $thumbtag = ps_product::image_tag( $image->file_name, ‘class=”browseProductImage”‘, 1, ‘product’, $image->file_image_thumb_width, $image->file_image_thumb_height );
    $fulladdress = $sess->url( ‘index2.php?page=shop.view_images&image_id=’.$image->file_id.’&product_id=’.$product_id.’&pop=1′ );

    if( $this->get_cfg(‘useLightBoxImages’, 1 )) {
    $html .= vmCommonHTML::getLightboxImageLink( $image->file_url, $thumbtag, $title ? $title : $image->file_title, ‘product’.$product_id );
    }
    else {
    $html .= vmPopupLink( $fulladdress, $thumbtag, 640, 550 );
    }
    $html .= ‘ ‘;
    if( ++$i > $limit ) break;
    }
    return $html;
    }
    /**
    * Builds the “more images” link
    *
    * @param array $images
    */
    function vmMoreImagesLink( $images ) {
    global $mosConfig_live_site, $VM_LANG, $sess;
    /* Build the JavaScript Link */
    $url = $sess->url( “index2.php?page=shop.view_images&flypage=”.@$_REQUEST[‘flypage’].”&product_id=”.@$_REQUEST[‘product_id’].”&category_id=”.@$_REQUEST[‘category_id’].”&pop=1″ );
    $text = $VM_LANG->_(‘PHPSHOP_MORE_IMAGES’).'(‘.count($images).’)’;
    $image = vmCommonHTML::imageTag( VM_THEMEURL.’images/more_images.png’, $text, ”, ’16’, ’16’ );

    return vmPopupLink( $url, $image.'<br />’.$text, 640, 550, ‘_blank’, ”, ‘screenX=100,screenY=100’ );
    }

    [/PHP]

    Or you get theme.php from the componentscom_virtuemartthemesdefault folder to update for theme.php inside the componentscom_virtuemartthemesja-zeolite folder

    good luck

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 14 years, 10 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum