X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   LANGUAGE variables available on product search results and category pages (https://forum.x-cart.com/showthread.php?t=77335)

christindall 11-11-2019 05:40 PM

LANGUAGE variables available on product search results and category pages
 
I have custom language variables in my xcart_products_lng_en tables.



I need to be able to display the content of these fields in "featured products", "new arrivals", and the category / subcategory product displays.



The fields are (obviously) displaying fine on the product details pages. But I cannot for the life of me figure out how to get them to display on the other pages - I don't believe that the languages tables are part of the sql that is pulled for those pages, but I can't figure out where it's pulling from so I can look at it and modify it.


OH - yeah - this is a db that started off years ago, and has been upgraded over time, and I'm in the middle of upgrading to 4.7.11



Help....?

christindall 11-11-2019 08:32 PM

Re: LANGUAGE variables available on product search results and category pages
 
Ok - so.... it looks like I was sort of mistaken - I can get other fields, like descr - but I cannot access my new custom field. Is there somewhere I need to define that sql table field to be able to access it?

christindall 11-11-2019 10:23 PM

Re: LANGUAGE variables available on product search results and category pages
 
Ok - so. In

include -> search.php I added my required data in 2 places (I'm just guessing at this and don't honestly care as long as it doesn't screw something up) -

I added about line 1585 (I copied the descr and changed the table cell name)
and I added a line at 648 (again, copied and modified).

So far, that seems to work.

then I changed the skin -> myskin -> customer -> main -> products_t.tpl / products_list.tpl to include my data.

Hope that makes sense and helps someone else.


All times are GMT -8. The time now is 11:27 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.