X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   Company Start Year (https://forum.x-cart.com/showthread.php?t=70934)

CenturyPerf 01-08-2015 01:18 PM

Company Start Year
 
I have a client that wants the year they opened for business to show as it has in the past, but X-Cart 5.1.9 only allows entries back to 1970.

Store Setup - Contact Information - "Year in which store opened"

Where do I change this value to allow earlier years?

totaltec 01-08-2015 02:54 PM

Re: Company Start Year
 
Since it won't change, I would just override the template and hard code this value. Probably much easier than editing the logic to allow the earlier year.

qualiteam 01-11-2015 11:59 PM

Re: Company Start Year
 
Hello Sam,

X-Cart uses "unix timestamp" format to store dates.
Unfortunately, this format allows dates from Jan 1, 1970 only: http://en.wikipedia.org/wiki/Unix_time

So, the easiest solution for you will be editing templates as Mike has suggested.

CenturyPerf 01-12-2015 01:25 AM

Re: Company Start Year
 
OK, but when editing the template, nothing happens--even after clearing the cache.

Example:

Before:
Code:

<div class="powered-by">
  <p class="copyright">&copy; {getCompanyYear()} {config.Company.company_name}. {t(#All rights reserved.#)}</p>
  <p class="powered-by-label">{getMessage():h}</p>
</div>


After:
Code:

<div class="powered-by">
  <p class="copyright">&copy; {t(#1964#)} {config.Company.company_name}. {t(#All rights reserved.#)}</p>
  <p class="powered-by-label">{getMessage():h}</p>
</div>


NOTE: I previously added the custom "powered-by" CSS to remove the .powered-by-label

tony_sologubov 01-12-2015 04:25 AM

Re: Company Start Year
 
Hi Sam!

I hope, you applied the change according to this guide: http://kb.x-cart.com/display/XDD/Step+2+-+applying+design+changes

If so, could you please send me your module so I could check it out?

Tony.


All times are GMT -8. The time now is 06:26 PM.

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