Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hello everyone... I am running on v2.3.1 and have strange problem with products share, and don't know what to do (can't find solution anywhere...)

 

My store is running on Cyrilic charset - and when someone click on "Like product" or just want to share some product url to Facebook or Google + it shows description in that way:

 

desc.jpg

 

In description section, it Shows only HTML tags - witout "< >", and don't show any Cyrilic character...?

 

This is FACEBOOK example, but it is the same with GOOGLE +... It is obviously i make mistakes in charsets I think... But don't know where... and way shows the latin characters in HTML code...

 

Please, any ideas..?

 

Thanks and Regards.

Sorry for my bad English, I am from Bulgaria.

Posted (edited)

Here is my code... If anybody need of it...

 

 

in: catalog/product_info.php

<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style ">
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
<a class="addthis_button_google_plusone"></a>
<a class="addthis_button_email"></a>
</div>
<!-- AddThis Button END -->

 

 

In: catalog/includes/template_top.php

 

<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-4d9ef23073f43e14"></script>

 

 

But, don't know is the problem is in the code... Because, when copy link (URL) and paste directly in Facebook to share, it show the picture in first post...

Edited by droper
Posted

Come on, Gyes... Please give me a hand with this... It's very important to me, and my poor store...

Posted (edited)

Hello again smile.png

 

I find solution for my problem.

 

There is In catalog\includes\application_top.php this:

 

<meta property="og:description" content="<?php echo preg_replace('/[^a-zA-Z0-9\s]/','',preg_replace('/\s+/',' ',preg_replace("/<br>/", "",$product_info['products_description']))); ?>" />

 

I change it to this:

 

 

<meta property="og:description" content="<?php echo preg_replace('/[^а-яА-Я0-9;:.,\s]/','',preg_replace('/\s+/',' ',preg_replace('<br/>', ' ',preg_replace('<b>', ' ',$product_info['products_description'])))); ?>" />

 

 

Now, If there is any latin character, will be ignore from description tag. It only shows - cyrilic symbols and - ; : .

 

I know that I have to do more changes... If I progress it, I will post here, for someone like me :)

Edited by droper

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...