"Zoom" Text disappeared on product hover

eCommerce WordPress theme with various e-store features and WooCommerce support.
GK User
Mon Mar 10, 2014 11:18 pm
Hi,

I am working on a site that has Storebox Theme for Wordpress, WPML for translation, and WooCommerce. As I was working on the site, the "ZOOM" text disappeared from the black circle that shows up when you hover on a product. See Here: http://www.mybodysport.co.il/%D7%9E%D7%95%D7%A6%D7%A8/super-pump-max-%D7%A1%D7%95%D7%A4%D7%A8-%D7%A4%D7%90%D7%9E%D7%A4-%D7%9E%D7%A7%D7%A1/

In the code there is there is a place for the text, but there is no text there. I need the text to be a string that I can translate in WPML also.
Code: Select all
<div class="gk-wc-zoom"><span><span class="zoom-text"></span></span></div>


Thank you in advance! :)
Sarah
User avatar
Junior Boarder

GK User
Tue Mar 11, 2014 8:21 am
Hi,

Please check your Storebox/woocommerce/single-producst/product-image.php file.
There should be this line, responsible for this "zoom" string:

Code: Select all
<div class="images wc-image-zoom" data-zoomtext="<?php echo __('zoom', GKTPLNAME); ?>">
User avatar
Moderator

GK User
Tue Mar 11, 2014 11:07 am
Hi,

My product-image.php file is the updated one (v 2.0.14) that I was instructed to replace when WooCommerce updated. I did not find that line, but I found this:
Code: Select all
         echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image ), $post->ID );

So I entered part of the code you sent, like this:
Code: Select all
         echo apply_filters( 'woocommerce_single_product_image_html', sprintf( '<a href="%s" itemprop="image" class="woocommerce-main-image zoom" title="%s" data-zoomtext="<?php echo __('zoom', GKTPLNAME); ?>" data-rel="prettyPhoto' . $gallery . '">%s</a>', $image_link, $image_title, $image ), $post->ID );

But then I got this error when I opened a product page:
Parse error: syntax error, unexpected 'zoom' (T_STRING) in StoreBox/woocommerce/single-product/product-image.php on line 33


Should I go back to the older version of product-image.php (v 2.0.3) that came with the latest version of Storebox, and just ignore the error messages from WooCommerce about the file product-image.php being out of date?

Thank you,
Sarah
User avatar
Junior Boarder

GK User
Tue Mar 11, 2014 2:33 pm
You can back to the previous file version (this message from Woocommerce is based only on file_version, so don't worry, file is ok).

You can also change this fragment:
Code: Select all
<div class="images">


into
Code: Select all
<div class="images wc-image-zoom" data-zoomtext="<?php echo __('zoom', GKTPLNAME); ?>">
User avatar
Moderator

GK User
Tue Mar 11, 2014 5:33 pm
Thank you! It worked!
User avatar
Junior Boarder


cron