Products RSS Feed in Litecart 2.1.1

Fra Ukjent
Medlem siden

How to make the AddOn compatible with LiteCart 2.1.1 on PHP 7.0 (@ MochaHost)

After installation, ErrorReporter Module, has sent:


Request: GET /feeds/products.rss HTTP/1.1
Client: *.*.*.*
User Agent: Mozilla/5.0 Vienna/3.3.0```

```Warning: Illegal string offset 'en' in ~/pages/feeds/products.rss.inc.php (Line 25)
Request: GET /feeds/products.rss HTTP/1.1Client: 
*.*.*.*
User Agent: Mozilla/5.0 Vienna/3.3.0```
Due to the fact that "english" is disabled as Language, I tryed to change to "italian":

```pages/feeds/products.rss.inc.php:2
$language_code = 'en'; 
=> $language_code = 'it';```
With no success. What to do?
tim
Founder
Fra Sweden
Medlem siden
tim

Italian is set by the url, either:

/it/page

Or

/page?language=it

Fra Ukjent
Medlem siden

"One step beyond"!
I changed "Vienna" feed reader URL to "http://www.poligrafica.store/feeds/products.rss?language=it" and it recovered the feeds.
But, the feeds are empty. Following is the content of one of the feed from Cached item in "Vienna":


<rss version="2.0">
  <channel>
    <title>Poligrafica</title>
    <description>Poligrafica</description>
    <link>http://www.poligrafica.store/</link>
    <lastBuildDate>Tue, 17 Apr 2018 01:15:57 +0200</lastBuildDate>
    <pubDate>Tue, 17 Apr 2018 01:15:57 +0200</pubDate>
  <item>
    <title>R</title>
    <description><    </description>
    <link>http://www.poligrafica.store/product.php?product_id=9</link>
    <pubDate>Wed, 04 Apr 2018 16:01:15 +0200</pubDate>
  </item>

  [..]

  <item>
    <title>R</title>
    <description>    </description>
    <link>http://www.poligrafica.store/product.php?product_id=53</link>
    <pubDate>Mon, 16 Apr 2018 14:33:45 +0200</pubDate>
  </item>
  </channel>
</rss>```
It seems that <title> and <description> tag are corrupted.

In the code,  at pages/feeds/products.rss.inc.php:20 this should recover the <title> for the $language_code defined

```$output .= '  <item>' . PHP_EOL

            . '    <title>'. $product->name[$language_code] .'</title>' . PHP_EOL```
Is "$product->name" the right way to recover the name of the product in Litecart 2.1.1?
Main Crew
Fra Sweden
Medlem siden

Add-on updated for LiteCart 2.x

Slettet
Fra Ukjent

There seems to be an issue with "Manufaturers", the're not displayed.

tim
Founder
Fra Sweden
Medlem siden
tim

@user3549 There are no manufacturers in the product feed.

Du
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.