Jump to content

Resolved - Facebook / Customers who also ....


kealan

Recommended Posts

Hi All, 

Cheers in advance for anyone who picks up on this. 

I appear to be having a clash between the 'customers who also bought section' at the bottom of the products page and the Facebook comment feed.

On any page where there are product recommendations 'customers who also bought section' it displays neither recommendations nor the Facebook feed. It simply displays the number 2 (see showing2.png). The Facebook feed works fine on any page without product recommendations (see showing feed.png). 

Its a fresh upgrade from v5 so I am using a very nearly stock foundation skin, with no changes to the content.product tpl  file itself. The Facebook plugin is from the extensions market installed with a token.  

LAMP / PHP Version 5.4.40 / mysql 5.5.41

showing2.png

showing feed.png

Link to comment
Share on other sites

  • 3 weeks later...

"On any page where there are product recommendations 'customers who also bought section' it displays neither recommendations nor the Facebook feed."

Allow me to say I am confused. You mention the feature, "customers who also bought section" (which is a feature seen during checkout), but you show pictures of the "Customer Reviews" feature (which is a feature of the View Product page).

Can we have a web address for this store?

Link to comment
Share on other sites

Hi Brian,

I have related products on my products page and I dont have additional related products mods. I thought related products this was a default addition to cc6 / foundation? I had written a related products modification for the cc5 version of the store but didnt expect it survived the upgrade.. 

store is https://mcsoutdoorstore.ie still under development but starting to take shape. Seems like the bad code is my own though if the related products is not a default addition to cc6 / foundation. 

 

 

 

Link to comment
Share on other sites

Well, I see the 2 under the "Write a Review" block. The HTML suggests that this is coming from either the getCommunityHTML() function of the Facebook social plugin, or from somewhere else -- perhaps your RP mod.

I don't see a call to Facebook, so if it is enabled, it is malfunctioning. I do see six calls to another website - perhaps a related site of yours?

We can help get your RP mod working with CC6 if you want.

Link to comment
Share on other sites

Yes having a few teething issues with calling FB in the footer and the page but thats another story! 

Not sure about the 6 external calls, all external calls on that page should be plugin / analytics related etc. 

I have disabled the facebook comment section only and the related products display again, but I have left the like buttons in place via the FB module in admin so it seems to just be the comments element causing the problem. 

Regards

Link to comment
Share on other sites

Hi Brian,

I seem to have given the wrong info I do appear to be using a related products module v1.0.0, I assume out of the box. I cannot see a call on that template file that relates to the related products being displayed.

Thanks 

Link to comment
Share on other sites

Well, if whatever is showing the '2' is not code that been added to this template file (you can delete the code posted above, it's no longer necessary to see it), it must be coming from the $COMMENTS array. An array that gets populated by plugins.

So there is an RP mod. But from the Extensions Marketplace, I cannot tell which one.

Open the mod's settings panel. There should be some indication who published it.

Link to comment
Share on other sites

I appear to be using a plugin from Webcity see excerpt from the xml below - but no reference for this plugin on the site 

    <creator><![CDATA[Webcity]]></creator>
    <homepage><![CDATA[http://www.webcity.com.au]]></homepage>

I would hate to waste any of your time given I seem to be using an outdated mod thats no longer supported, again my understanding though is appears to be deeply flawed was I was using this from stock so the issue was a wider one and may affect others. 

Link to comment
Share on other sites

We found the problem with this plugin. (It seems it was myself who made a number of interesting edits to this plugin -- which this latest version may currently be available from WebCity.au.

The plugin copies the action of finding "Customer Also Bought" as seen during checkout, and the result is shown on the Product Details page.

My edits added the results to the Smarty variable $COMMENTS array. $COMMENTS is used by the CubeCart->_product() and CubeCart->loadPage()@case:_a=document functions and are stingy* about it.

I was using the wrong PHP function to incorporate the plugin results into $COMMENTS. I was using array_unshift(), which returns an integer, not the resultant array. The correct function is array_merge().

*Stingy: The two cases mentioned about using $COMMENTS is that the results of all enabled Social modules are grouped into an array and assigned directly to $COMMENTS. Thus, if any other type of module/plugin wants to use the $COMMENTS variable, and have already loaded their content into it using a hook, there is the very real possibility of having it trashed/replaced by content developed by the two CubeCart functions.

Link to comment
Share on other sites

Hi Brian,

 

Many thanks for your assistance changing that from unshift to merge had the desired effect! 

I will update again once I get some time to add some meaningful styling 

Regards

Kealan 

 

fbrelatedprod.png

Edited by kealan
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...