Post by bvladimirk » Sun Feb 09, 2014 3:52 am

Hi! Maybe it's a little bit stupid question but...I have a module which i'm trying to integrate to opencart.
I have this code for button

Code: Select all

<div class="Try">
  <a href="#" onclick="javascript:return try_mi('img/hat/try1.png');">Try it</a>
  </div>
and JS part

Code: Select all

function try_mi(hat_image){
    $(".the-face .hat .draggable .rotatable .resizable img").attr("src", hat_image);

    return false;
}
Everything works fine but i need to change path to "hat". Instead of ('img/hat/try1.png') i need a path to additional photo of product (i've guess i need a <img src="<?php echo $image['thumb']; ?>" as a path) but as for now i can't make it work...

Code: Select all

<a href="#" onclick="javascript:return try_mi <img src="<?php echo $image['thumb']; ">Try it</a>
return me on main page :(
Last edited by bvladimirk on Mon Feb 10, 2014 2:39 am, edited 1 time in total.

Newbie

Posts

Joined
Sun Feb 09, 2014 3:30 am

Post by inactiveaccount9912 » Mon Feb 10, 2014 2:20 am

I think it should be:

Code: Select all

<a href="#" onclick="javascript:return try('<?php echo $image['thumb']; ?>');">Try it</a>

Expert Member

Posts

Joined
Fri May 14, 2010 2:36 am

Post by bvladimirk » Mon Feb 10, 2014 2:37 am

florinsith wrote:I think it should be:

Code: Select all

<a href="#" onclick="javascript:return try('<?php echo $image['thumb']; ?>');">Try it</a>
Yes, thanks you:)

Newbie

Posts

Joined
Sun Feb 09, 2014 3:30 am
Who is online

Users browsing this forum: No registered users and 4 guests