XHShop in multilingual site

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
milkodb
Posts: 47
Joined: Sun Jun 23, 2013 11:00 pm
Location: Italy

XHShop in multilingual site

Post by milkodb » Mon Sep 12, 2022 11:10 am

Hi,

I installed the second language according to the procedure: copied the folder '2lang' and renamed 'en'. I created the 'en' folder in the 'content' folder and inserted the content.html of the English version into it. Following the installation logic for the first language, in this same 'en' folder I copied the xhshop folder containing catalog.php and catalog.bak.php.

XHShop has problems in the second language: the product list is missing the link to the details page and only some data is displayed: the product name and the price. Everything else is missing. In the backend, the form for creating a new product or modifying an existing product has no formatting and all fields minus the price, weight, checkmarks for availability and the scrolling list of product pages have php labels as% NAME% and% VARIANT%, etc.

Debugging returns errors starting with the call to productCategorySelector () in BackEndView.php (line 50) and the trace continues with various errors. I link an image of the editing page of the editing page produced with the errors reported by the debugger.

www.ilpenninodinoaloi.it/-%20lab/box_ou ... roduct.jpg

Obviously there are no links to the content.htm and certainly to the template functions in the backend as well as the images folder, etc.

Did I get the wrong location to put the folder with the catalog.php?
Is there any problem with the location of some files regarding the plugin?

Anyone have any idea how to fix?
Milko

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: XHShop in multilingual site

Post by frase » Mon Sep 12, 2022 11:53 am

milkodb wrote:
Mon Sep 12, 2022 11:10 am
Following the installation logic for the first language, in this same 'en' folder I copied the xhshop folder containing catalog.php and catalog.bak.php.
This was not a good idea.
The catalog does not need to be copied to the language folder. To work in other languages, there are language files in the plugin itself.
The prerequisite for everything to work correctly in the second language is that the content and page structure there is also correct.
Also the shop-configuration must be adapted in the second language (e.g. the name of the shop-page, etc.).

A "dirty" trick would be if you simply copy the "content.htm" from the main language into the "en" folder.
This way you have the page structure and content available in the second language - the adaptation might be easier.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: XHShop in multilingual site

Post by cmb » Mon Sep 12, 2022 12:05 pm

frase wrote:
Mon Sep 12, 2022 11:53 am
The catalog does not need to be copied to the language folder. To work in other languages, there are language files in the plugin itself.
Right. Also note that the items in the catalog are stored for all languages in the same catalog.php file.
Christoph M. Becker – Plugins for CMSimple_XH

milkodb
Posts: 47
Joined: Sun Jun 23, 2013 11:00 pm
Location: Italy

Re: XHShop in multilingual site

Post by milkodb » Mon Sep 12, 2022 2:30 pm

Hi frase and CMB,

well my installation for the english version is fully translated using the language and config files as usual except the catalog for now. And there are quite a few articles, of course, and the goddamn Murphy's law. :roll:

So I have an idea that I will have to remove the English content.htm file, try to add an article, see what happens in the standard installation content file and then invent some automatisms to correctly re-insert all products from the English catalog.htm file into the one recognized by the plugin. :: lol:

Thank you very much, now I'm going to see what other mess I can make. : D
Milko

Post Reply