Zen Cart Logo
Forums / Basic Configuration / Instructions in docs don't work

Instructions in docs don't work

Views: 3,910

Results 1 to 18 of 18
25 May 2023, 1:59 AM
#1
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Instructions in docs don't work

Zen Cart 1.5.8 and above:

Open the includes/languages/english/lang.index.php file and find the following code:

'HEADING_TITLE' => 'Congratulations! You have successfully installed your Zen Cart® E-Commerce Solution.', Replace the text starting “Congratulations” with your own text that is welcoming and describes your business.

Make sure that the single quote marks at the beginning and end are not left out. If your text includes single-quotes (apostrophes) be sure to add a \ before them to “escape” them for proper PHP syntax.
NOTE: There is a similar line that starts with 'HEADING_TITLE_NESTED', so be sure to replace both lines.

I followed instructions and replaced text in both lines but text doesn't change. it is not a cache issue, tested in two browsers (Firefox and Chromium, refreshed and SOL).
This must be coming from a different file, which one?

25 May 2023, 2:26 AM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,097
Plugin Contributions:
56

Re: Instructions in docs don't work

First, you should not be editing the 'base' file (the directions need to be updated). You should copy /includes/languages/lang.index.php to your template override version (/includes/language/YOUR_TEMPLATE/lang.index.php and then make the edits.

Here's what I've done for a client:

<?php
$define = [
/*
    'TEXT_GREETING_GUEST' => 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?',
    'TEXT_GREETING_GUEST_SHOWCASE' => 'Welcome, please enjoy our online showcase.',
    'TEXT_GREETING_PERSONAL' => 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?',
    'TEXT_INFORMATION' => 'Define your main Index page copy here.',
    'TEXT_NO_PRODUCTS' => 'There are no products to list in this category.',
    'TEXT_NO_PRODUCTS2' => 'There is no product available from this manufacturer.',
    'TEXT_NUMBER_OF_PRODUCTS' => 'Number of Products: ',
    'TEXT_SHOW' => 'Filter Results by:',
    'TEXT_BUY' => 'Buy 1 \'',
    'TEXT_NOW' => '\' now',
    'HEADING_TITLE_PRODUCTS' => 'Available Products',
*/
    'HEADING_TITLE' => 'Welcome to Our Site!',
    'HEADING_TITLE_NESTED' => 'Welcome to Our Site!',
];

return $define;
25 May 2023, 4:59 AM
#3
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: Instructions in docs don't work

The instructions in https://docs.zen-cart.com/user/new_user_topics/congratulations/ say

Save the edited file to includes/languages/english/YOURTEMPLATE/lang.index.php and upload it to your server.

You probably have already created this file and but are still editing the base file.

25 May 2023, 9:38 PM
#4
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

swguy:

The instructions in https://docs.zen-cart.com/user/new_user_topics/congratulations/ say

Save the edited file to includes/languages/english/YOURTEMPLATE/lang.index.php and upload it to your server.

You probably have already created this file and but are still editing the base file.
I guess I missed the last part of copying over base file to template override.
My apologies

25 May 2023, 10:33 PM
#5
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,808
Plugin Contributions:
15

Re: Instructions in docs don't work

Just a thought. Sometimes the problem is that the information may not be in your primary language.

For those that are trying to get through the docs and English is not your first language, You can click on the accessibility icon on any page and click on the Select Language Dropdown. That will transform that page to the selected language.

28 May 2023, 6:46 PM
#6
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

swguy:

The instructions in https://docs.zen-cart.com/user/new_user_topics/congratulations/ say

Save the edited file to includes/languages/english/YOURTEMPLATE/lang.index.php and upload it to your server.

You probably have already created this file and but are still editing the base file.

I just double checked and both files have been edited, just in case, still changes do not show.
Agreed that base file should not be edited, just copied over, but both are identical now.

28 May 2023, 6:48 PM
#7
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

dbltoe:

Just a thought. Sometimes the problem is that the information may not be in your primary language.

For those that are trying to get through the docs and English is not your first language, You can click on the accessibility icon on any page and click on the Select Language Dropdown. That will transform that page to the selected language.
Praise to the translationi effort, but that doesn't apply to my case.

28 May 2023, 7:39 PM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Instructions in docs don't work

So is you use the developers tool kit to search the catalog side for:
Congratulations!
In what file(s) does it appear?

29 May 2023, 3:00 PM
#9
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

mc12345678:

So is you use the developers tool kit to search the catalog side for:
Congratulations!
In what file(s) does it appear?

It was edited successfully, thanks!

29 May 2023, 4:01 PM
#10
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: Instructions in docs don't work

What exactly happened? I like to document common failure paths so people can figure out how to recover.

30 May 2023, 5:37 PM
#11
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

lat9:

First, you should not be editing the 'base' file (the directions need to be updated). You should copy /includes/languages/lang.index.php to your template override version (/includes/language/YOUR_TEMPLATE/lang.index.php and then make the edits.

Here's what I've done for a client:

<?php $define = [ /* 'TEXT_GREETING_GUEST' => 'Welcome <span class="greetUser">Guest!</span> Would you like to <a href="%s">log yourself in</a>?', 'TEXT_GREETING_GUEST_SHOWCASE' => 'Welcome, please enjoy our online showcase.', 'TEXT_GREETING_PERSONAL' => 'Hello <span class="greetUser">%s</span>! Would you like to see our <a href="%s">newest additions</a>?', 'TEXT_INFORMATION' => 'Define your main Index page copy here.', 'TEXT_NO_PRODUCTS' => 'There are no products to list in this category.', 'TEXT_NO_PRODUCTS2' => 'There is no product available from this manufacturer.', 'TEXT_NUMBER_OF_PRODUCTS' => 'Number of Products: ', 'TEXT_SHOW' => 'Filter Results by:', 'TEXT_BUY' => 'Buy 1 \'', 'TEXT_NOW' => '\' now', 'HEADING_TITLE_PRODUCTS' => 'Available Products', */ 'HEADING_TITLE' => 'Welcome to Our Site!', 'HEADING_TITLE_NESTED' => 'Welcome to Our Site!', ]; return $define; ``` Agreed that the correct method is to copy over the base file. I did the incorrect method of editing both files, no problem I will not edit base file in live site, just update the one in template. That is the reason I use a test site so I can make mistakes without editing directly live. Anyway, thank you seniora vinos, it worked! CK
30 May 2023, 10:01 PM
#12
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Instructions in docs don't work

ckosloff:

Agreed that the correct method is to copy over the base file.
I did the incorrect method of editing both files, no problem I will not edit base file in live site, just update the one in template.
That is the reason I use a test site so I can make mistakes without editing directly live.
Anyway, thank you seniora vinos, it worked!
CK

If that is the case, why the report earlier that had changed both files but still saw no change in response? Better yet. Next time you go to make a change in a language file and you think to yourself, I had a problem with that one before. Let me go look at what I wrote about. Do you think you have given yourself enough information in this thread to help yourself not have the same issue? Can you read through the thread, figure out what the cause of your problem was and how you were able to figure out a solution and specifically what the problem and solution were?

31 May 2023, 3:54 PM
#13
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

swguy:

What exactly happened? I like to document common failure paths so people can figure out how to recover.

Nothing, disregard, I am now an old fart.

31 May 2023, 4:23 PM
#14
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,710
Plugin Contributions:
56

Re: Instructions in docs don't work

There is tremendous value to @mc12345678's suggestions. Why?

  • The exact same thing might happen to you again, and it would be good to have a record of what you did to fix it.
  • The exact same thing could happen to someone else, and again, it would be good to have a record of how to fix it.
1 Jun 2023, 1:33 PM
#15
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

swguy:

What exactly happened? I like to document common failure paths so people can figure out how to recover.

Nothing don't worry, lat 9 showed that wrong file was being edited manually.
Thanks for caring for Zen Cart, I am a free software fan.

1 Jun 2023, 1:40 PM
#16
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

mc12345678:

If that is the case, why the report earlier that had changed both files but still saw no change in response? Better yet. Next time you go to make a change in a language file and you think to yourself, I had a problem with that one before. Let me go look at what I wrote about. Do you think you have given yourself enough information in this thread to help yourself not have the same issue? Can you read through the thread, figure out what the cause of your problem was and how you were able to figure out a solution and specifically what the problem and solution were?

I changed both files but missed to refresh browser and see changes, stupid mistake.

1 Jun 2023, 10:13 PM
#17
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Instructions in docs don't work

ckosloff:

I changed both files but missed to refresh browser and see changes, stupid mistake.

We all do it. Wish I could point to the times I have done the same and gotten help to realize it was a PIC (Person-In-Chair) problem. :)

Try your best to make things work in standard fashion unless you have a true business need to do something special. That will allow you to focus on making money instead of having lots of work arounds.

2 Jun 2023, 2:30 PM
#18
ckosloff avatar

ckosloff

Totally Zenned

Join Date:
Feb 2007
Location:
South Florida, USA
Posts:
1,375
Plugin Contributions:
0

Re: Instructions in docs don't work

mc12345678:

We all do it. Wish I could point to the times I have done the same and gotten help to realize it was a PIC (Person-In-Chair) problem. :)

Try your best to make things work in standard fashion unless you have a true business need to do something special. That will allow you to focus on making money instead of having lots of work arounds.
I never think on complicating things and I really need to make money out of my new endeavor with e-commerce, not new just rehashed, I decided to delve deeper into permissions because it wasn't working for me, not 777 or 755, likewise I think that I will not use EZ pages because it is easier for me to use Writer the editor, provided by Libre Office in my Linux distro, which allows to create sections and chapters, and then export to PDF format.