Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author kenrichman

    (@kenrichman)

    Yes I see the problem, I don’t have an answer yet, I will look into it.

    Plugin Author kenrichman

    (@kenrichman)

    Well I don’t think this is going to resolve your issue but if you are using WPML you will need to add this file to the plug-in anyway so please start by doing this.

    Create a file called wpml-config.xml and upload to the plug-in’s directory. This is the file contents:

    <?xml version="1.0" encoding="UTF-8"?>
    <wpml-config>
    	<admin-texts>
    		<key name="productprint_ops">
    			<key name="button_legend" />
    			<key name="header_image" />
    			<key name="header_text" />
    			<key name="footer_text" />
    		</key>
    	</admin-texts>
    </wpml-config>
    Thread Starter composit

    (@composit)

    Thank for your help,
    It does’nt work….

    I tried to upload the file in wpml directory (incorporating your code lines in the existing file) and in productprint directory….

    Plugin Author kenrichman

    (@kenrichman)

    Ok. Let me see what I can do about this.

    Plugin Author kenrichman

    (@kenrichman)

    It look slike the javascript for the print function is not being loaded because WPML changes the URL. The following fix may solve your issue.
    Please edit the file tpl-print.php

    Locate this line:

    <script src="<?php print home_url('/wp-includes/js/jquery/jquery.js'); ?>"></script>

    Replace the line with the following:

    <?php
    	$cur_lang = apply_filters( 'wpml_current_language', null );
    
    	$def_lang = apply_filters( 'wpml_default_language', null );
    
    	do_action( 'wpml_switch_language', $def_lang );
    
    ?>
    <script src="<?php print home_url('/wp-includes/js/jquery/jquery.js'); ?>"></script>
    <?php
    
    do_action( 'wpml_switch_language', $cur_lang );
    ?>

    Let me know how that goes.

    Thread Starter composit

    (@composit)

    Hi, thanks for your reply.
    Unfortunately, your solution doesn’t works…

    FR —> ok
    EN —> no
    SP —-> no

    https://www.sunset-fishing.com/en/produits-sunset/surf-casting-en/wave-master-s2-competition/

    Plugin Author kenrichman

    (@kenrichman)

    I can see from the source code of the generated page that the URL has not changed. So just to get you on your way, as a temporary fix please try this:

    Locate the same line as before in tpl-print.php :

    <script src="<?php print home_url('/wp-includes/js/jquery/jquery.js'); ?>"></script>

    Replace it with this:

    <script src="https://www.sunset-fishing.com/wp-includes/js/jquery/jquery.js"></script>

    Thread Starter composit

    (@composit)

    PERFECT !
    You find the solution !
    It works fine now.
    Thank you !

    Plugin Author kenrichman

    (@kenrichman)

    Thank you for letting me know.

    This is obviously not a perfect solution, (to hard-code your site URL into the code – others please note), I will have to do more work to find a better solution for a future release.

    Thank you for working on this! I’m having similar issues using Transposh. When Print Product is clicked, it leads to a blank page.

    Plugin Author kenrichman

    (@kenrichman)

    @officeasst Please supply a link to your site

    I’m having the issue on 2 sites (set up very similarly):

    https://lifechoice.net/

    https://doctorschoice.ca/

    Plugin Author kenrichman

    (@kenrichman)

    Can you please deactivate other plugins and see if there is a clash? For instance does it work if you deactivate transposh?

    It does work when Transposh is deactivated (that was the first thing I checked), so I’m guessing it’s some language-related clash? That’s why the WPML issue caught my eye.

    I really like the plugin, though. Other than getting it to play nicely with Transposh, there’s one thing I want to customize (hiding a YouTube video when printing, so I’m trying to lookup how to do that), but aside from that, the printouts are perfect!

    Plugin Author kenrichman

    (@kenrichman)

    I’ll install transposh and see what’s what, but I can’t guarantee a fix, if the two are just incompatible.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Impossible generate product print sheet with WPML’ is closed to new replies.