| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Bookmark this page - how to? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
![]() I've been reading that offering a reminder to bookmark can boost repeat shopping, but I'm having a hard time getting this code to work with smarty
I've found a fairly clean code that looks like this: <script> function bookmark(title,url){ if(window.sidebar) window.sidebar.addPanel(title,url,■"); else if(window.opera && window.print){ var elem = document.createElement(▓a'); elem.setAttribute(▓href▓,url); elem.setAttribute(▓title▓,title); elem.setAttribute(▓rel▓,▓sidebar▓); elem.click(); } else if(window.external) window.external.AddFavorite(url,title);} </script> And to call it on a page you use this: <a href=■javascript:bookmark(▓Henrie Media Inc.▓,▓http://www.henriemedia/▓);■>Bookmark this page</a> But x-cart is giving a bunch of problems, for one its taking me to a 404-not found page (which may or may not be my SEO module interfering.) Has anyone successfully implemented this on their site?
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#2
|
|||||||
|
|||||||
![]() Are you just adding the entire <script> to a Smarty template such as welcome.tpl?
If so, you will probably need to add {literal} tags, so you can escape the "{" and "}" characters when added to a Smarty template. See this Smarty reference page for more details: http://www.smarty.net/manual/en/language.function.literal.php If you haven't already done so, you might want to try putting the entire <script> in an external Javascript file and reference it on the pages you want the bookmark feature to be available. Also, test it out in different web browsers to see if you are having the same success/failure in each of the main browsers. Robert
__________________
X-cart 4.1.10 |
|||||||
#3
|
|||||||||
|
|||||||||
![]() I actually put the <script> section into common.js
then attempted to use the href call on product.tpl along with the product name and URL smarty tags so that the bookmark option would be dynamically generated. But this only produce a 404 not found, which leads me to think that the actual script is tripping up somewhere.
__________________
- www.nerdseven.com - Gadgets & Gizmos from Out of This World - Sound Sensitive T-Shirts That Flash to the Beat of Music (http://www.tqualizer.com) X-Cart Version 4.1.10 |
|||||||||
#4
|
|||||||
|
|||||||
![]() Why don't you try "add bookmark" service of http://www.addthis.com/ .
It's FREE & you can track how many people have bookmarked which pages also. Also it's very easy to inegrate with x-cart.
__________________
X-Cart: 4.7.7 LIVE Skin:Ultra by xcartmods.co.uk X-cart Modules: | ACR, Rich Google Search, Customer Testimonials | Cloud Search, | Websitecm: CDSEO (2.1.9) --------------- Server: Linux php: 5.3 mysql: 5.0.89 ---------------- |
|||||||
|
|||
X-Cart forums © 2001-2020
|