Support » Plugin: Product Catalog for WordPress » Wrong number in lightbox

  • Resolved lacike

    (@lacike)



    When I open catalog page on my webpage I see “SyntaxError: Unexpected number” in Google Chrome. The problem is that floating numbers are stored with comma as decimal separator, e.g.: var lightbox_opacity = 0,201;

Viewing 8 replies - 1 through 8 (of 8 total)
  • it seems to me that the problem is catalog_front_end_view.php:
    var lightbox_opacity = <?php echo ($paramssld[‘light_box_opacity’]/100)+0.001;?>;

    Easy fix is to replace it with e.g.:
    var lightbox_opacity = <?php echo number_format(($paramssld[‘light_box_opacity’]/100)+0.001, 2, ‘.’, ”);?>;

    Huge-IT Support

    (@huge-it-support-1)

    Dear lacike,

    Thanks for your post.
    We will be glad to check the issue if you provide a link to the page where the catalog is added.

    If the problem still exists, we would like to check it.

    Thanks

    My page is now working fine, because I applied the modification I sent you. Please check the code I sent you, it’s quite obvious what the problem is. You’re relying on php’s native conversion of number to string, which might have different setup (symbols).

    Huge-IT Support

    (@huge-it-support-1)

    Dear lacike,

    We have checked the code at our end and it is absolutely correct.
    Thank you very much for your attention and observation.
    We will include this in our upcoming update.

    This is the case when we can say thank YOU for YOUR support! 😀
    Let us know if there is anything else we can help you with
    We will be glad to assist.

    Thanks

    Hi,

    I am sorry, I don’t understand whether the code at your end is correct or whether you’re going to include a fix in upcoming update.

    L.

    Huge-IT Support

    (@huge-it-support-1)

    Dear lacike,

    We are going to include the fix in our upcoming update.
    The code which you have used for fixing the issue is effective thus you can use that solution until we will release an update.

    Let me know if you have other questions.

    Thanks

    Thanks, it’s very much appreciated.

    Huge-IT Support

    (@huge-it-support-1)

    Dear lacike,

    Thank you too for using our plugin.
    Let us know if you have other questions
    We will be glad to assist.

    Thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Wrong number in lightbox’ is closed to new replies.