Jump to content
Sign in to follow this  
alaricB

Social Account not showing

Recommended Posts

Hi.

I've taken over managing a site and am new to Cubecart. In 'Store Settings' under 'Social Account' I've added a linkedin URL (and saved) and expected it to show up on the site immediately, but it's not.

Is there something else I need to do?

From what I can workout, this info is being loaded by the file element.social.php, however, I'm not sure where this file is loaded from. 

Any help would be appreciated.

Thanks

Share this post


Link to post
Share on other sites

Welcome alaricB! Glad to see you made it to the forums.

The latest versions of CubeCart have a 'deferred cache clearing' process. That is, once the admin has made the necessary changes (from a single update to a very great number of updates) for the moment, then the admin must clear the cache. This is indicated and accomplished by the lit button at the upper-right of the admin settings screen.

Until the cache is cleared, changes made in admin do not immediately show on the storefront (as the storefront is still using cached database queries and recordsets).

 

Share this post


Link to post
Share on other sites

Thanks for replying, however, I've cleared the cache, ensured that the linkedin URL has been saved, but there is still nothing showing on the front end.

I was thinking that if I knew which file loaded it, or, if there was a separate setting, I may be able to locate the issue. 

Any thoughts/help would be appreciated.

Thanks

Share this post


Link to post
Share on other sites

For CubeCart 6.2.2, in /classes/gui.class.php, near line 1444, is the function _displaySocial() that collects the social data from the store's databased general configuration array and populates another array to be passed over to the template element.social.php.

 

Share this post


Link to post
Share on other sites

Thanks for the response. I've worked through the files mentioned and have an update, but still have not managed to crack this one...

My  /classes/gui.class.php file does has the function _displaySocial() as mentioned.

There wasn't  the element.social.php file in my skins/templates folder so I've moved a copy from the Foundation skin over.

It seems as if I have 2 issues (I've also added {$SOCIAL_LIST} to main.php file in order to display the links as it wasn't there):

1) element.social.php is not being loaded. I've tested this by adding some simple HTML to the element.social.php file (outside the IFs), and the HTML added does not get displayed.

2) $SOCIAL_LINKS seems to be empty, even though I have two URLs in the admin area. I've tested this by adding just the display code from element.social.php file to main.php. The result is that the 'Follow us' header is displayed, however, neither of the links I've added are displayed.

I can't work out how to force the loading of element.social.php, or, why $SOCIAL_LINKS is empty.

Any help would be really appreciated. One good thing about this problem is that I'm learning lots about CubeCart which is fun.

Regards

 

Share this post


Link to post
Share on other sites

In the CubeCart 6 code, function _displaySocial(), starts with checking for the presence of the skin template file element.social.php. If it is not present, nothing gets done (as there is no place to show the data).

That template gets rendered to HTML and assigned to the variable SOCIAL_LIST, where $SOCIAL_LIST gets displayed in the main.php template.

We will cause Smarty to show its list of variables at this time. In the template main.php, at the end, add {debug}. This will cause the browser to want to show a popup window. Let it. (You may need to reload the page as the window may not have the correct contents.)

The window will list all the variables that have been assigned up to the point where the template gets rendered. Scroll to find $SOCIAL_LINKS. If it is not in the list, then the _displaySocial() function (via Smarty) did not find the template element.social.php.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×