Post by guntis.e » Tue Aug 30, 2011 9:03 pm

I am modifying the google base feed for my needs. Default Google base module doesn't include the language selection.
What langugage the feed will be, if there is more than one language?
How to define the feed language?

Using oc 1.4.9.5
Last edited by guntis.e on Thu Sep 01, 2011 2:18 am, edited 2 times in total.

Guntis
Image Partneris.lv - opencart web site development and support


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by uksitebuilder » Tue Aug 30, 2011 9:06 pm

It is the default store language of the front end when the front end of your store loads.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by guntis.e » Tue Aug 30, 2011 9:08 pm

thanks, Simon. Can you also tell how to specify the language for the feed?

Guntis
Image Partneris.lv - opencart web site development and support


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by uksitebuilder » Tue Aug 30, 2011 9:19 pm

Not 100% on this, but a cookie is set in the main store with:

name = language
value = en

or value = lv (for your store when the Latvian flag is clicked)

How you would get that to work with the feed, I am unsure, would need to test.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by guntis.e » Tue Aug 30, 2011 9:31 pm

cookie is not an option, because the feed is used by another e-commerce site for product import and there must be a way to set the language programmatically, not from the user interface.

the google base feed calls the
public function getProducts()
which has query containing

Code: Select all

...WHERE pd.language_id = '" . (int)$this->config->get('config_language_id')....
is there an easy way to set this to the language i need without changing default language?

Guntis
Image Partneris.lv - opencart web site development and support


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by guntis.e » Tue Aug 30, 2011 10:10 pm

looks like this is solving my problem:

Code: Select all

$this->config->set('config_language_id', 2);

Guntis
Image Partneris.lv - opencart web site development and support


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am

Post by uksitebuilder » Tue Aug 30, 2011 10:16 pm

Which you could pass in the $_GET params for the feed link and retrieve as such

$this->config->set('config_language_id', $this->request->get['lang_id']);

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by guntis.e » Tue Aug 30, 2011 10:34 pm

thank you Simon again. Thats very good suggestion

Guntis
Image Partneris.lv - opencart web site development and support


Active Member

Posts

Joined
Fri Jan 28, 2011 4:20 am
Who is online

Users browsing this forum: No registered users and 2 guests