AlexTechnologysuppt Posted September 2, 2016 Share Posted September 2, 2016 Hello Prestashop addicts Prestashop forums and staff is starting to die... But i still like it more than any other ecommerce to the point... I wanna make a simple website with links to my main website. Website: http://e-dil.gr/converseallstargr/prestashop But i want to click on the product image or to "more" and redirects automatically to link. I made it with a button inside the products (catalog mode) but still im not satisfied. Any ideas from experts ? Link to comment Share on other sites More sharing options...
AlexTechnologysuppt Posted September 3, 2016 Author Share Posted September 3, 2016 Update: found how to do it on homepage without coding. Just used the CMS on homepage module by mypresta.eu Now for the products inside category still the problem persists :/ Link to comment Share on other sites More sharing options...
rocky Posted September 3, 2016 Share Posted September 3, 2016 On my website, I used the reference code to generate a "Buy" link to redirect to the PrestaShop Addons pages. You could do something similar to that, though you can't enter a full URL in the reference field. You may need to find another unused field or create a new one. Link to comment Share on other sites More sharing options...
AlexTechnologysuppt Posted September 3, 2016 Author Share Posted September 3, 2016 Hello sir, Thank you for your fast reply. Could you please explain more what you mean? Im not that expert to prestashop. Im using it 2-3 months :/ Link to comment Share on other sites More sharing options...
rocky Posted September 3, 2016 Share Posted September 3, 2016 I can't be specific without knowing exactly what you're trying to do. It seems you want the "More" button link to go to a separate website with it's own product page. If you go to my Image Gallery product page here, you'll see the Buy button redirects to http://addons.prestashop.com/en/front-office-features-prestashop-modules/22219-gallery.html to buy the module there. To do this, I changed the button code in product.tpl to: <a href="http://addons.prestashop.com/{$language.iso_code}/front-office-features-prestashop-modules/{$product.reference}.html" class="btn btn-primary" target="_blank"> <i class="material-icons shopping-cart"></i> {l s='Buy'} </a> As you can see, I have hardcoded the domain name, but I'm using the product reference to choose the page on PrestaShop Addons. You could do a similar thing in product-list.tpl by editing all the <a href=""> links with the domain of your other website and enter the page as the reference code on each of your products. Link to comment Share on other sites More sharing options...
AlexTechnologysuppt Posted September 3, 2016 Author Share Posted September 3, 2016 (edited) I am trying to do exactly what you mentioned. I already tried that but it failed because i couldn't use full links to reference. Thanks you so much for your time Edited September 6, 2016 by AlexTechnologysuppt (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted September 4, 2016 Share Posted September 4, 2016 You can create override/classes/Product.php with the following to increase the length of the reference field and change the validation function to isUrl(): <?php class Product extends ProductCore { public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { ProductCore::$definition['fields']['reference']['size'] = 128; ProductCore::$definition['fields']['reference']['validate'] = 'isUrl'; parent::__construct($id_product, $full, $id_lang, $id_shop, $context); } } You'll also need to edit the ps_product and ps_product_shop tables in your database using phpMyAdmin and increase the length of the reference field to 128 to match the code above. Link to comment Share on other sites More sharing options...
AlexTechnologysuppt Posted September 5, 2016 Author Share Posted September 5, 2016 (edited) it Worked!! Thanks you so much!! May i ask what file to edit links for the picture click? (currently working "more" button to redirect,but some ppl will click on the image) Edited September 5, 2016 by AlexTechnologysuppt (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted September 6, 2016 Share Posted September 6, 2016 You'll need to edit product-list.tpl in your theme's directory and replace the {$link->getProductLink} with your custom URL. Link to comment Share on other sites More sharing options...
ChinoPS Posted September 6, 2016 Share Posted September 6, 2016 You'll need to edit product-list.tpl in your theme's directory and replace the {$link->getProductLink} with your custom URL. Hello Rocky. Do you know if is there another option to achieve that without touch product-list.tpl? I mean, could i edit link attribute for a some products to set the page where show its details? Thanks a lot for you help. Link to comment Share on other sites More sharing options...
AlexTechnologysuppt Posted September 6, 2016 Author Share Posted September 6, 2016 it Works very well. I don't think there is another way.Only with a module that does the same thing. Or with catalog mode and a button to the discription of the product like "more" "buy it" "show price" etc. Link to comment Share on other sites More sharing options...
ChinoPS Posted September 6, 2016 Share Posted September 6, 2016 I'm developing a module to custom product in a external page. I achieved to end customization and add product to cart, but, i would like that once the product is in the cart when the user click on it, it will go to external page instead to default page.Also in the catalog list i would like to send some products to external page. Any ideas?Thanks for your time. Link to comment Share on other sites More sharing options...
Nouha_Chouchene Posted March 6, 2019 Share Posted March 6, 2019 On 9/6/2016 at 5:19 AM, rocky said: You'll need to edit product-list.tpl in your theme's directory and replace the {$link->getProductLink} with your custom URL. i want to show product image on an other window? 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