[Skip to main content](#vessel-content)

#   auto trim description in google product description

##

- **[RG](/forum/user/39276-rg "View RG's Profile")**
- [![RG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39276-rg "View RG's Profile") Topic Author
- [ Offline](/forum/user/39276-rg)

Less More

- Posts: 71
- Thank you received: 1
-
-

9 years 8 months ago [\#265215](#265215) by [RG](/forum/user/39276-rg "View RG's Profile")  *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#265215 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")* was created by *[RG](/forum/user/39276-rg "View RG's Profile")*

-- HikaShop version -- : 3.6.1

Hey,

Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.

If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?

Best regards,

RG

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26402
- Thank you received: 4081
-
- [](http://obsi.dev)
-

9 years 8 months ago [\#265217](#265217) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#265217 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")*

Hello,

I'm afraid that HikaShop 3.6.1 is not a valid version number.
Without knowing your version number, we can't know what version of the plugin you have.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RG](/forum/user/39276-rg "View RG's Profile")**
- [![RG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39276-rg "View RG's Profile") Topic Author
- [ Offline](/forum/user/39276-rg)

Less More

- Posts: 71
- Thank you received: 1
-
-

9 years 8 months ago [\#265270](#265270) by [RG](/forum/user/39276-rg "View RG's Profile")  Replied by *[RG](/forum/user/39276-rg "View RG's Profile")* on topic *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#265270 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")*

oops HikaShop Business: 3.0.1

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

9 years 8 months ago -  9 years 8 months ago [\#265278](#265278) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#265278 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")*

Hi,

You'll have to modify the code of the plugin in the file plugins/hikashop/google_products/google_products.php and change the code: Code:

if(!empty($product-&gt;product_description)){ if(@$plugin-&gt;params['preview']){ $xml .= "\t".'&lt;g:description&gt;&lt;![CDATA[ '.strip_tags(preg_replace('#&lt;hr *id="system-readmore" */&gt;.*#is','',$product-&gt;product_description)).' ]]&gt;&lt;/g:description&gt;'."\n"; }else{ $xml .= "\t".'&lt;g:description&gt;&lt;![CDATA[ '.strip_tags($product-&gt;product_description).' ]]&gt;&lt;/g:description&gt;'."\n"; } }

to the code: Code:

if(!empty($product-&gt;product_description)){ if(@$plugin-&gt;params['preview']){ $xml .= "\t".'&lt;g:description&gt;&lt;![CDATA[ '.substr(strip_tags(preg_replace('#&lt;hr *id="system-readmore" */&gt;.*#is','',$product-&gt;product_description)),0,5000).' ]]&gt;&lt;/g:description&gt;'."\n"; }else{ $xml .= "\t".'&lt;g:description&gt;&lt;![CDATA[ '.substr(strip_tags($product-&gt;product_description),0,500).' ]]&gt;&lt;/g:description&gt;'."\n"; } }

Last edit: 9 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [RG](/forum/user/39276-rg "View RG's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[RG](/forum/user/39276-rg "View RG's Profile")**
- [![RG's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/39276-rg "View RG's Profile") Topic Author
- [ Offline](/forum/user/39276-rg)

Less More

- Posts: 71
- Thank you received: 1
-
-

9 years 7 months ago [\#266022](#266022) by [RG](/forum/user/39276-rg "View RG's Profile")  Replied by *[RG](/forum/user/39276-rg "View RG's Profile")* on topic *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#266022 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")*

Ok thanks I changed it. Will you also change this behavior in the plugin? Or do I need to change it with every update of hikashop?

Best regards,
RG

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14325
-
-

9 years 7 months ago [\#266043](#266043) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[auto trim description in google product description](/forum/30-integrations/889389-auto-trim-description-in-google-product-description#266043 "-- HikaShop version -- : 3.6.1  Hey,  Is it possible to automatic trim the text from the description that goes to google shopping with the Hikashop Google Products Plugin? If there are more then 5000 characters the product are not imported.  If that is not possible how can I modify the plugin while keeping the update possibilities for the rest of hikashop?  Best regards,  RG")*

Hi,

It will be added yes since that is a requirement of the API as per [ support.google.com/merchants/answer/7052112?hl=en](https://support.google.com/merchants/answer/7052112?hl=en)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMwLWludGVncmF0aW9ucy84ODkzODktYXV0by10cmltLWRlc2NyaXB0aW9uLWluLWdvb2dsZS1wcm9kdWN0LWRlc2NyaXB0aW9uP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.065 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
