Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Share Product box too small


Schizolocal

Recommended Posts

I'm installing v2.3.4.1 and have come across a glitch

Despite me enabling Social Bookmarks and the Product Social Bookmarks features, the Share Product box is just a heading and no content.

I have inspected the generated source and the widget seems to include all of the bookmarks, but they just do not get displayed

Here's the HTML concerned:

<div class="ui-widget infoBoxContainer" >  <div class="ui-widget-header infoBoxHeading">Share Product</div>  <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="http://tufeta/eshop/catalog/tell_a_friend.php?products_id=35"><img src="images/social_bookmarks/email.png" border="0" title="Share via E-Mail" alt="Share via E-Mail" /></a> <div class="g-plus" data-action="share" data-href="http://tufeta/eshop/catalog/product_info.php?products_id=35" data-annotation="inline" data-height="15" data-align="left"></div><script type="text/javascript">
  if ( typeof window.___gcfg == "undefined" ) {
    window.___gcfg = { };
  }

  if ( typeof window.___gcfg.lang == "undefined" ) {
    window.___gcfg.lang = "en";
  }

  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script> <a href="http://www.facebook.com/share.php?u=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fproduct_info.php%3Fproducts_id%3D35" target="_blank"><img src="images/social_bookmarks/facebook.png" border="0" title="Share on Facebook" alt="Share on Facebook" /></a> <a href="http://twitter.com/home?status=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fproduct_info.php%3Fproducts_id%3D35" target="_blank"><img src="images/social_bookmarks/twitter.png" border="0" title="Share on Twitter" alt="Share on Twitter" /></a> <a href="http://pinterest.com/pin/create/button/?description=Conceptual+2&media=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fimages%2FConceptual+2.jpg&url=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fproduct_info.php%3Fproducts_id%3D35" class="pin-it-button" count-layout="none"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a></div></div>

(It's running on my testing server using the latest XAMPP)

The referenced images are all in the right places too.

So, why does the box not get displayed?

1948205604_ShareProductBox.png.7ad609b13573ad3f3de62f1b8ed71042.png

 

Any ideas?

Stuart

 

Link to comment
Share on other sites

Just do a simple edit to see if it's a script problem! just try an see if you can output simple text into the box. If I remember corectly the box size if a function of what is beeing displayed, so if nothing is beeing output then no box or very small box ie one line!

 

Link to comment
Share on other sites

Zahid

Thanks for the suggestion - but as you may discern from the HTML, there are all the <a href...> elements in the container <div> (which is

<div class="ui-widget-content infoBoxContents" style="text-align: center;">

)

and this class is used elsewhere for other widgets which don't appear to be problematic.

(I'm not sure how I would try to output simple text to the box anyhow)

By the way, the same behaviour occurs on my live server too.

 

Stuart

Link to comment
Share on other sites

Could it be because of this apparently garbled ref?

http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fimages%2FConceptual+2.jpg&url=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fproduct_info.php%3Fproducts_id%3D35"

 

I've no idea why this should be like this or even if it is so intended. One interesting factoid is that the product image referred to has a filename with a space in it "Conceptual 2.jpg" - this appears to have been translated to "Conceptual+2.jpg" - which highlights my total ignorance of what's going on really.

It's not a show stopper - I'll just disable Social Bookmarks, but that would be a shame

Stuart

Link to comment
Share on other sites

5 hours ago, Schizolocal said:

(I'm not sure how I would try to output simple text to the box anyhow)

<?php echo '<p>Hello World</p>'?> 

if the module is installed corectly it will out put hello world in the box. If not then the thing has not installed properly.

 

Link to comment
Share on other sites

I've done the "Hello World" test and it works fine.

The so-called 'garbled' reference is also OK - it's urlencoded, so I suppose Facebook (or whoever) decodes it first before dereferencing.

urlencoding changes all non-alphanumeric to hex codes and spaces to + signs. So  it is correct.

I'll look again at the images

(Thanks to all who have replied)

Stuart

 

Link to comment
Share on other sites

I have found a problem with Pinterest though - I use the Protected Images contribution and the mods have overlooked the sb_pinterest.php reference to a product image. I've corrected that but it hasn't solved anything. Just enabling, say, Facebook displays nothing, and Facebook's link doesn't include a link to a product image like Pinterest's does.

The relative reference to the social_bookmarks images looks right to me and the images are definitely there. I'll have to start debugging !!

 

 

Link to comment
Share on other sites

Zahid - it's not a native href - it has to be urldecoded first. It is passed as a parameter to Facebook's 'share.php' program, which presumably does the decoding to restore the proper href.

 

Link to comment
Share on other sites

Mybe I'm missing somthing it happens far too often 😂

but normaly you can test these buy just entering into browser, if its valid it will say so.

http://www.facebook.com/share.php?u=http%3A%2F%2Ftufeta%2Feshop%2Fcatalog%2Fproduct_info.php%3Fproducts_id%3D35

 

Link to comment
Share on other sites

Oh - that's because the reference is to my testing server which Facebook can't see (it's on my local LAN)

Note that outputting something to the Social Bookmarks box does not require that the references are valid. Clicking on the icon will fail, but the icon should be displayed nevertheless.

 

Link to comment
Share on other sites

Ok that would explain it failling, but on a live site you can just enter the href in to browser and if its valid you will get the login like this. It's allways been a quick way of testing. This is from a valid href entered in to browser directly.

image.thumb.png.f3b6b4b3951a7ad7cb1d6ae439c56cfe.png

 

Link to comment
Share on other sites

11 minutes ago, Schizolocal said:

Note that outputting something to the Social Bookmarks box does not require that the references are valid. Clicking on the icon will fail, but the icon should be displayed nevertheless.

Yes very true.

 

Link to comment
Share on other sites

I think I've cracked it.

Using Firefox on my laptop fails, but using Chrome on my desktop works fine.

Looks like it's either Firefox itself, or my privacy settings

(So, there's not necessarily anything wrong with the oscommerce software - other than the Pinterest oversight)

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...