Issues with Google shopping descriptions

LiteCart Fan
Från Sweden
Medlem sedan feb. 2016

Hi @tim

I get issues from Google shopping. 
It says "missing value (Description)" (I do not have short description on all items).
Also "Text to short (Description)"

I have Description on the parts that is in this list so it feels like it is trying to get information from the wrong place. 
So I looked in your .xml.inc.php file and found;
'. htmlspecialchars($product->short_description) .'' . PHP_EOL

Is this correct?

If yes, any ideas where i should look what is wrong. 

Looking forward to your reply.

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

Oh that's a yellow card for a terribly non-creative forum topic.

If you are asking if it should say $product->description rather than $product->short_description that is entirely up to you. I remember Google Shopping was a hopless service to debug so I really have no more clues other than read the notices carefully and think logic.

Sometimes there is a forbidden character. Sometimes there are forbidden words. Sometimes everything looks right but just isn't.

LiteCart Fan
Från Sweden
Medlem sedan feb. 2016

Thank @tim
I'll guess it will be a little trial / error to get that working then

LiteCart Fan
Från Sweden
Medlem sedan feb. 2016

Oh, and thank you for the yellow card :)

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

Lol. I think I have an example just like this in the things not to do when creating a new topic.

LiteCart Fan
Från Sweden
Medlem sedan feb. 2016

For information, changing from $product->short_description to $product->description worked. No issues at this point. thank you @tim

LiteCart Fan
Från Australia
Medlem sedan dec. 2018

Good to know acid. I will also try this.

A Google Shopping Feed problem I am having is that a couple of my products are showing in the feed with their brand as Green Duck. <g:brand>Green Duck</g:brand>.  I am guessing this was one of the brands for the demo products?  Now I only have two brands listed in the Manufacturers sections.  First one is ACME corp which is disabled and the second one is a brand I created.  So I am not sure why a couple of my products have "Green Duck" as the manufacturer in the Google Shopping feed.  I have double checked in the Catalog and the brand is showing up correctly as the brand name that I created.

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

The brand in the demo is ACME Corp. Green Duck was a sample product name. It should not pop up in the feed as a brand.

LiteCart Fan
Från Australia
Medlem sedan dec. 2018

Must be a bug then?

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

The XML feed says:
. '      <g:brand>'. (!empty($manufacturer->id) ? htmlspecialchars($manufacturer->name) : '') .'</g:brand>' . PHP_EOL
and the CSV feed says:
'brand' => !empty($manufacturer->id) ? $manufacturer->name : '',
Everything seems to be good in the code. What does your database table lc_manufacturers say?

LiteCart Fan
Från Australia
Medlem sedan dec. 2018

table lc_manufacturers only shows the 2 manufacturers - Acme Corp & the one I added.  Image attached.

LiteCart Fan
Från Australia
Medlem sedan dec. 2018

@tim Thanks. I have sent you an email.

tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

Found the cause.

    $manufacturer = $product->manufacturer_id ? reference::product($product->manufacturer_id) : null;
should be

    $manufacturer = $product->manufacturer_id ? reference::manufacturer($product->manufacturer_id) : null;

Patched your installation and I updated the download for anyone else.

LiteCart Fan
Från Australia
Medlem sedan dec. 2018

[quote]acid
Feb 26 2019 08:51 am
For information, changing from $product->short_description to $product->description worked. No issues at this point. thank you @tim[/quote]

Thanks. I also had the problem with description not working and made this change and it fixed the description so it's now working.

But, the description has html code in it. eg.



<h1><span style="color: #0e9e9e;"><strong><span style="font-family: Verdana,Geneva,sans-serif;">...```
Looking at a similar issue on StackOverflow, I see the below suggestion. But I can't work out how to edit the line code to do such as change?

```$Content = preg_replace("/&#?[a-z0-9]{2,8};/i","",$Content);```
tim
Founder
Från Sweden
Medlem sedan maj 2013
tim

@label If you want to strip the html tags from the text it's strip_tags($product->description).

Du
Denna webbplats använder inga kakor och ingen spårningsteknik från tredje part . Vi tror att vi kan göra det bättre än andra och tänker verkligen på din integritet.