Jump to content

Social Media Icons on home page?


vidmarc

Recommended Posts

  • 2 months later...

In the Foundation skin, there is already a space for them in the footer area. They show up when the web address to your accounts are entered in admin, Store Settings, General tab.

The HTML of the skin can be modified to put those links somewhere else.

But these are links to your social media accounts, not "triggers" that actually do anything - "like", for example.

If you have these kinds of "triggers" already on the View Product page, I would say it is easy enough to put them on a different template.

Please remind us of a web address where we can see what you currently have.

Link to comment
Share on other sites

By "trigger", I mean a link or button that triggers some kind of javascript that sends info to wherever at Facebook.

You said you had a "Like" button on product pages.

I see you are using Blueprint. On the product page, I see a Share link referencing AddThis.

Do you have the Facebook social extension?
https://www.cubecart.com/extensions/social-plugins/facebook-comments-like-buttons

Link to comment
Share on other sites

Again, that adds "Like" buttons to the product pages, not the main template home page

I'm going to give Foundation skin a go - but the product descriptions look way to big - how do I change the text size? Another forum thread needed?

Link to comment
Share on other sites

Sure, the templates are coded to show these buttons on Product and Document pages. They show up with the template code:

{if $SHARE}
      {foreach from=$SHARE item=html}
      {$html}
      {/foreach}
{/if}

with the appropriate div container layouts and styling for the respective skin.

CubeCart assigns these buttons to the template variable $SHARE when building either a product or document page*, after which, CubeCart builds the side boxes and main structure.

Thus, you can put this code anywhere in the template main.php or a box.whatever.php.

* Not any other page, such as a Category page, or Login, or Search page.

Link to comment
Share on other sites

  • 1 month later...

My best guess is that the javascript called from:

<script type="text/javascript" src="https://s7.addthis.com/js/250/addthis_widget.js#[email protected]"></script>

is not wanting to work with desktop web browsers.

Or maybe that javascript isn't compatible with wide viewscreens.

Using the web browser on your desktop, narrow the width to 320 pixels (or enable the "Responsive Design Mode").

Do the buttons show then?

Link to comment
Share on other sites

I'm afraid they do not when I resize the window and not in "Responsive Design Mode".

Could you tell me where exactly I have to enter the code Addthis gives me?

There does not seem to be an option for Cubecart.

Thanks.

Edited by M6VMO
Forgot to mention something.
Link to comment
Share on other sites

Furthermore, the Addthis code is:

<!-- Go to www.addthis.com/dashboard to customize your tools -->
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5a9898f373af59ac"></script>

and the PHP code in modules/social/index.php mentions "/js/250/...", however, in the js folder, there is none of those folders present.

Link to comment
Share on other sites

In admin, Manage Extensions, click the Edit icon for AddThis.

There is a text entry box for username. I see that the example you posted above is pubid (for version 300).

The URL you were given is actually built in the AddThis module's file social.class.php.

 

Link to comment
Share on other sites

The admin settings screen is the only place where you enter your info (username, probably) and the list of buttons you want to show (leave absolutely blank if you want buttons specified at your AddThis account).

But, if you want to update the module code, you would change lines 28 and 65:


28: $this->_path = '/js/300/addthis_widget.js';

65: $this->_html[] = '<script type="text/javascript" src="'.$this->_protocol.$this->_url.$this->_path.'#pubid='.$this->_module['username'].'"></script>';

And for the Username, use the 'ra-' code.

None of this explains why you have seen the buttons on a mobile device. I have no answer for that.

Link to comment
Share on other sites

Thank you for your help.

Unfortunately, still nothing showing up on my laptop, there is a change on my mobile, though:

I had only selected 4 icons, now I am getting the whole lot.

 

This is getting more and more mysterious to me.

:D

Link to comment
Share on other sites

The whole row of icons on my mobile was because I cleared the box in the admin panel where you select which icons you want.

On the laptop there is a change: where the icons are supposed to appear I can see a sort of faint placeholder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...