vidmarc Posted September 25, 2013 Posted September 25, 2013 Can these be used with Cubecart? I already have the standard AddThis installed via the social plugins but this option is more involved, and looks like you need to embed some code somewhere. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 I think you need to provide more information about the version of AddThis you're talking about. Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 I wasn't aware there was a version? It's whatever AddThis is offering via their site. http://www.addthis.com Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 Poor choice of words on my part when I said version. I've not seen their site in a long time, so Smart Layers didn't mean anything to me. It says you put the code wherever you want it to show on your site, so it would seem logical that you comment out the section from your skin/templates/content.product.php {if $SHARE} {foreach from=$SHARE item=html} {$html} {/foreach} {/if} And replace it with the Smart Layer code. Since I'm guessing, be sure to save a good copy of the file before you try it. I'll be interested to see what you find out. I would assume you disable the CC plugin. Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 Thanks, but I think I'll leave it as it is (via the Social Media plugin), I don't fancy messing around with templates. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 If you don't mind paying someone to do it, you might be able to get someone on the 3rd party forum to edit the existing plugin code to use the Smart Layer version. It might be simple enough to do that Bsmither, or another knowledgeable poster, could tell you what to do here, since that plugin is provided by CC. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 I've contacted AddThis to see if they can tell us what to do. Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 Thanks for that. I've had to contact the AddThis tech guys too, because my AddThis isn't displaying any analytics. Quote
bsmither Posted September 25, 2013 Posted September 25, 2013 Seems easy enough. I'll need someone to actually "get the code" for the desired configuration (choose everything). Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 <!-- AddThis Smart Layers BEGIN --> <!-- Go to http://www.addthis.com/get/smart-layers to customize --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51ed4555069430e7"></script> <script type="text/javascript"> addthis.layers({ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ {'service': 'facebook', 'id': 'Nucleus-Films'}, {'service': 'twitter', 'id': 'nucleusfilms'} ] }, 'whatsnext' : {}, 'recommended' : {} }); </script> <!-- AddThis Smart Layers END --> Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 The guy at AddThis just said: Everything appears to be set up correctly on your end, and shares are showing up in the live view. You should, however, change this: <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=ra-51ed4555069430e7"></script> to this: <script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-51ed4555069430e7"></script> Does this mean CC is adding something incorrectly? Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 I tried it on our plushcatalog blueprint skin store, with my facebook and twitter account info included in the code, and I'm getting an error that has something to do with the facebook profile part of the code: [Exception] /home3/butter01/public_html/plushcatalog/includes/lib/smarty/sysplugins/smarty_internal_templatecompilerbase.php:665 - Syntax Error in template "/home3/butter01/public_html/plushcatalog/skins/blueprint/templates/content.product.php" on line 310 "{'service': 'facebook', 'id': 'pages/Dirty-Butter-Plush-Animal-Shoppe/115434421845432'}," - Unexpected ": ", expected one of: "}" , " " , ATTR Here's my whole AddThis SmartLayer Code: <!-- AddThis Smart Layers BEGIN --> <!-- Go to http://www.addthis.com/get/smart-layers to customize --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-524305117d3cbe99"></script> <script type="text/javascript"> addthis.layers({ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ {'service': 'facebook', 'id': 'pages/Dirty-Butter-Plush-Animal-Shoppe/115434421845432'}, {'service': 'twitter', 'id': 'search4lovies'} ] } }); </script> <!-- AddThis Smart Layers END --> Quote
vidmarc Posted September 25, 2013 Author Posted September 25, 2013 Do you need to include the numbers after your Facebook ID? Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 I don't know if I do or not. It's part of the url for our store page. Well, tried going to the page without the numbers, and FB did not find it. So,yes, the numbers are necessary. Quote
bsmither Posted September 25, 2013 Posted September 25, 2013 You are adding this directly to a Smarty template. Smarty {$placeholders} and {code} are surrounded by braces with no white space. This sequence: {'service': will cause Smarty to try to interpret it. Rewrite the added code so that there will always be white space (space, tab, return) on the inside of the braces: { 'service': (and at the end of the line) @vidmarc: did you choose all the options? Or just that which was applicable to you? By choosing all the options, I can then update the AddThis module correctly, and thus make the whole thing be as it should. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 Per what I understood your instructions to be, I changed the code to: <!-- AddThis Smart Layers BEGIN --> <!-- Go to http://www.addthis.com/get/smart-layers to customize --> <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-524305117d3cbe99"></script> <script type="text/javascript"> addthis.layers({ 'theme' : 'transparent', 'share' : { 'position' : 'left', 'numPreferredServices' : 5 }, 'follow' : { 'services' : [ { 'service': 'facebook', 'id': 'pages/Dirty-Butter-Plush-Animal-Shoppe/115434421845432' }, { 'service': 'twitter', 'id': 'search4lovies' } ] } }); </script> <!-- AddThis Smart Layers END --> I've disabled the CC Addthis plugin, and I added this to both our stores. The error messages have stopped, but it's not showing on either store, even though I've cleared cache. I realize the estates store has the wrong facebook url at this point - just trying to get the code right at the moment. Quote
bsmither Posted September 25, 2013 Posted September 25, 2013 I see things in the Kurouto skin: two circle buttons in the upper-right, five square buttons along left edge. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 Weird. I looked at the kurouto store in IE, FF, and Chrome, and didn't see anything. And I just realized I had not disabled the AddThis Plugin on dirtybutterestates.com. I have it disabled now in the kurouto store. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 I put the AddThis plugin back on both sites, so the social buttons would be on the products. The Smart Layer seems to target sharing the whole store, if I understand correctly. Quote
bsmither Posted September 25, 2013 Posted September 25, 2013 If the module is upgraded correctly (as opposed to pasting generated code directly into the main template), the AddThis Smart Layers code joins any other social module's code where the $SOCIAL placeholder is located -- site-docs and/or prod-detail pages. (Having pasted the code into the main template will display the effect on all pages.) That said: whatever it is that the javascript wants to do is up to it. Quote
Dirty Butter Posted September 25, 2013 Posted September 25, 2013 The SITE url's seem to be hard coded into this new code. I don't want to lose the plugin's ability to send the link to the actual product to FB and Twitter. Anyway, I'd never even heard of this until vidmark asked for help with it. I only attempted to install it to help him. I don't intend to leave it on my sites. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.