Jump to content

pull price, description inside a javascript from product


Recommended Posts

hello, i have this code inside the footer.tpl

{literal}
  [removed]
     var active = 1;
     var Browser = {
       Version: function() {
         var version = 999; // we assume a sane browser
         if (navigator.appVersion.indexOf("MSIE") != -1)
           // bah, IE again, lets downgrade version number
           version = parseFloat(navigator.appVersion.split("MSIE")[1]);
         return version;
       }
     }
     if (active == 1) {
     if (Browser.Version() >= 7) {
        if (location.href.indexOf("&aqoon;") != -1) {
               [removed](unescape("[removed][removed]"))
         }
     }
     }
  [removed]
  [removed]
          aqoonObject.SaaS.show({
            /* required */
            partnerId: "198",
            productPicture: "http://aqoon.local{/literal}{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}{literal}",
            productId: "{/literal}{$product->id|intval}{literal}",
            devise: "€",
            title: "{/literal}{$product->name|escape:'htmlall':'UTF-8'}{literal}",
            description:"{/literal}{$product->description_short|escape:'htmlall':'UTF-8'}{literal}",
            promotionPrice:"",
            price: "{/literal}{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}{literal}",
          })
  [removed]
{/literal}




if i put this in the footer.tpl and add a product to the cart which is placed in the right column, the price and none of the data is returned.

where as if i put it inside the product.tpl it works fine.

what am i missing here? and how do i return the description, price inside the javascript correctly?

thanks
norman

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...