♥Dnj1964 Posted May 3, 2019 Posted May 3, 2019 Wanting to add links in the product description. One option would to use target="_blank" but that opens a new page and leads the customer away from their original product interest. Using <a href="https://www.really-bad-idea.ca/index.php?cPath=92_212" target="popup" onclick="window.open('https://www.really-bad-idea.ca/index.php?cPath=92_212','popup','width=800,height=800'); return false;"> 'Water Based'</a> Opens the link in a pop-up and works as a way to up-sell related products and keeps the customer on their original browsed to product. Window is resizeable so works perfect on mobile as well. Just wondering if there is a better way to do the same thing. Thanks, Doug
MrPhil Posted May 3, 2019 Posted May 3, 2019 Just a note that this code can be used for evil purposes. The URL in href= is the one shown by browsers (Firefox, anyway, I haven't tried it on others), but the address in window.open() is the one the visitor actually goes to. Not to give anyone ideas...
puddlec Posted May 3, 2019 Posted May 3, 2019 What about using https://apps.oscommerce.com/y0rDZ&related-products-bs Goes on the product page and basket page Customers would be able to see the name, image, description, price (if enabled) Phoenix support now at https://phoenixcart.org/forum/ App created for phoenixTinyMCE editor for admin
♥JcMagpie Posted May 3, 2019 Posted May 3, 2019 2 hours ago, Dnj1964 said: Just wondering if there is a better way to do the same thing If all you need is to display info then simply use a modal. safe clean and bootstrap.
♥JcMagpie Posted May 4, 2019 Posted May 4, 2019 If you dont wish to use a modal, you can still do this with simple html/js, The safe popup to use is this, thake a look at the image and when you move the mouse over it a popup opens giving you more info. Very simple code and can be simply added to any discription as a link. It can have text, images, links....... Styling with simple css. see example https://www.w3schools.com/howto/howto_js_popup.asp <div class="popup" onclick="myFunction()">Click me! <span class="popuptext" id="myPopup">Put any content in here</span> </div> https://chilleddisplays.co.uk/product_info.php/cPath/26/products_id/57
♥JcMagpie Posted May 4, 2019 Posted May 4, 2019 Need something a bit more fancy? try this https://sweetalert2.github.io/ the possibilities are endless 😊
MrPhil Posted May 4, 2019 Posted May 4, 2019 Per Doug's original code, I don't think the anchor tag (<a... /a>) does anything at all except provide a label to click on. You might be able to do the same thing with a <span onclick=...>label</span>. If you want the user to see the address the link is going to, you'll end up having to use <a href=..., but be careful to have the exact same URL in both, so your customers can't accuse you of hijinks.
♥Dnj1964 Posted May 6, 2019 Author Posted May 6, 2019 On 5/4/2019 at 10:44 AM, MrPhil said: Per Doug's original code, I don't think the anchor tag (<a... /a>) does anything at all except provide a label to click on. You might be able to do the same thing with a <span onclick=...>label</span>. If you want the user to see the address the link is going to, you'll end up having to use <a href=..., but be careful to have the exact same URL in both, so your customers can't accuse you of hijinks. Thank you. That is exactly how I am using the code. Didn't think of using <span onclick that may be a better option, don't care if url to customer or not. Using it to supply a link and not direct away from original page. Thanks again!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.