Jump to content

hungryfrank

Members
  • Content count

    427
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by hungryfrank


  1. 1 minute ago, LeeFoster said:

    We're sat here struggling and you coded it yesterday!!😀

    <script>
    $(function() {
        var img_option='images/sample/'+'lime-1'+'.jpg';
        $("#input_1").change(function(){
            val = $("#input_1 option:selected").text();
            $("a.lb:first").html( "<img src="+ img_option+">");
          $('a.lb:first img').css({'width' : '150px' , 'height' : '150px'});
        });
    });
    </script>

    try this and change the size


  2. 13 minutes ago, PiLLaO said:

    Select the container to jquery an put the image inside

    I don't see a container

    16 minutes ago, LeeFoster said:

    Yeah that works, only issue is the image goes out of the constraints of the gallery.

    I think it has to do with the size of the image. the product lime is in the same way to me


  3. <script>
    $(function() {
        var img_option='images/sample/lime-1.jpg';
        $("#input_1").change(function(){
            val = $("#input_1 option:selected").text();
            $("a.lb:first").html( "<img src="+ img_option+">");
         
        });
    });
    </script>

    you have to adjust the   var img_option inside of change function based inn the selected value

    other than that it works


  4. On 6/5/2020 at 2:32 PM, LeeFoster said:

    I don't see why this needs to be a case of installing something else. Using the product id from the URL and the option value from the dropdown as the image name along with a modified version of the jQuery I posted above should be a good starting point.

    eg. My product id is 11 and the option values are 1 - 3 so my images would be 11_1.jpg, 11_2.jpg & 11_3.jpg

    Smart naming of the images will mean that it doesn't need to be assigned against an option in admin.

     

    did u get this to work?

    <script>
    $(function() {
        $("#input_1").change(function(){
            val = $("#input_1 option:selected").text();
            $(".pi-gallery").html( "<img src='images/sample/lime-1.jpg'>");
         
        });
    });
    </script>

    try this at the end of product_info.php see how it works.

    see if you can pass the images somehow?

     

     


  5. if i wanted to do this at a minimum I would install one of these contribution's admin side so i would be able to enter the image for the options.  then I would use an Ajax to pull this image when it is selected and display it where the main image is in pi-gallery,

     

     


  6. uninstall and install it again. this sometimes works

    On 4/7/2020 at 2:46 PM, ludo41 said:

    Hello,

    I have problem with this module, After i have install this , i have message error :

    Warning: Use of undefined constant MODULE_HEADER_TAGS_JCM_COLOR_TWEAK_TITLE - assumed 'MODULE_HEADER_TAGS_JCM_COLOR_TWEAK_TITLE' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\broc\includes\modules\header_tags Phoenix\ht_jcm_color_tweak.php on line 29

    Warning: Use of undefined constant MODULE_HEADER_TAGS_JCM_COLOR_TWEAK_DESCRIPTION - assumed 'MODULE_HEADER_TAGS_JCM_COLOR_TWEAK_DESCRIPTION' (this will throw an Error in a future version of PHP) in C:\xampp\htdocs\broc\includes\modules\header_tags Phoenix\ht_jcm_color_tweak.php on line 30

     

    Anybody tryc to install this module with this phoenix version ?

    thanks a lot

    Ludo

     

     

×