lat9 / gpsf

An update to the previous Numinix version, now supporting Zen Carts 1.5.6 and above (including 1.5.8a) as well as PHP versions 5.6 through 8.2.
GNU General Public License v2.0
2 stars 2 forks source link

tag <description> uses currently-selected shopfront language instead of admin-selected feed language #20

Closed torvista closed 6 months ago

torvista commented 6 months ago

from here: https://github.com/lat9/gpsf/blob/e73e3974a3989eb88e59051343a1dc78a6533d92/includes/classes/gpsfFeedGenerator.php#L452

torvista commented 6 months ago

Since I pull in boilerplate text constants into the product descriptions, these were also not in sync with the selected feed language. After a lot of trial and error, the only thing that works (for me) is setting $_GET['language'] = the language code, before application_top is called. If the language code was passed from admin to controller (instead of the id), this would be easier to use (I used a switch for now).

lat9 commented 6 months ago

I'll be dealing with that via some simplification for the feed-generation language handling, essentially letting the base Zen Cart storefront processing deal with it.

Instead of passing $_GET['language_id'] from the admin tool to the storefront feed-generator, changing that to pass $_GET['language'] (the language code) should "do the trick".

lat9 commented 6 months ago

Noting, too, that this correction will remove the GPSF_LANGUAGE configuration setting, in deference to a store's DEFAULT_LANGUAGE.

torvista commented 6 months ago

works for me.

lat9 commented 6 months ago

works for me.

Was that in response to the missing language-suffix?

torvista commented 6 months ago

yes.