Danny4444 Posted November 3, 2013 Share Posted November 3, 2013 Hi, I run Prestashop in catalog mode, so i do not sell any items. (portal site) In my product list i want the image linked too another website insted of product detail. How can i make this work? regards Danny Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 3, 2013 Share Posted November 3, 2013 It depend on how you insert the URL as a link to another website. You can use Product Reference to insert the URL as a link to another website Then you just have to replace the default URL linked to product image on your product-list.tpl file. {$product.link|escape:'htmlall':'UTF-8'} Replace with {$product.reference|escape:'htmlall':'UTF-8'} <a href="{$product.reference|escape:'htmlall':'UTF-8'}" class="product_img_link" title="{$product.name|escape:'htmlall':'UTF-8'}"> <img src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html'}" alt="{$product.legend|escape:'htmlall':'UTF-8'}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} /> {if isset($product.new) && $product.new == 1}<span class="new">{l s='New'}</span>{/if} </a> Link to comment Share on other sites More sharing options...
Danny4444 Posted November 3, 2013 Author Share Posted November 3, 2013 Hi Thanks for your quick reply 2 errors field ref too lang (32max) ref not valid (= &) Any ideas? Link to comment Share on other sites More sharing options...
NemoPS Posted November 4, 2013 Share Posted November 4, 2013 Is there a chance you can post the link you used, and the wrapping code? Link to comment Share on other sites More sharing options...
vekia Posted November 4, 2013 Share Posted November 4, 2013 you can change size param for "reference" field in object definition in classes/Product.php you can also extend Product object with this: http://www.prestashop.com/forums/topic/285258-how-to-add-new-text-field-to-a-product-which-will-only-be-available-from-the-bo/?do=findComment&comment=1437763 then instead of reference you can use new field Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted November 4, 2013 Share Posted November 4, 2013 Hi Thanks for your quick reply 2 errors field ref too lang (32max) ref not valid (= &) Any ideas? You may consider to use bitly or any other shortener URL service out there to get rid of your long URL and restricted characters issues. But if you insist to use the original URL which is long and contains restricted characters, then you should modify the core files and try vekia modifications (create custom product vars) Link to comment Share on other sites More sharing options...
Danny4444 Posted November 4, 2013 Author Share Posted November 4, 2013 SOLVED extend Product object with this: http://www.prestasho...o/#entry1437763 WORKS FINE Thanks everyone regards Danny Link to comment Share on other sites More sharing options...
vekia Posted November 5, 2013 Share Posted November 5, 2013 thank you for confirmation that it works glad to hear that my little tutorial works well i marked this thread as [solved] best regards Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now