Forums / Templates, Stylesheets, Page Layout / Store Address and Phone

Store Address and Phone

Locked
Results 1 to 11 of 11
This thread is locked. New replies are disabled.
07 May 2009, 21:19
#1
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Store Address and Phone

The admin console (ver 1.3.8a) provides a place to store the "Store Name, Address and Phone used on printable documents and displayed online" utilizing Config>My Store> Store Address and Phone.

There are two parts to my question.

Part One:
1. What is the name of the variable that is assigned the value I type into the text box labeled "Store Address and Phone"?
2. Where is the file located (i.e., what is the directory and file name) that contains the code that accepts the text I input for "Store Address and Phone"?

Part Two:
The contents of the above variable (I'll call it "MY Store Address and Phone" since I don't know its actual name) is displayed on the CONTACT US page.
3. Where is the file located (i.e., what is the directory and file name) that contains the code that displays "MY Store Address and Phone" on the CONTACT US page?

I have looked in:
/includes/templates/template_default/templates/tpl_contact_us_default.php
/includes/languages/english/contact_us.php
/includes/languages/english/html_includes/classic/define_contact_us.php
/includes/modules/pages/contact_us/header_php.php
/includes/modules/pages/contact_us/on_load_main.js

I'm pretty much ready to :cry:
07 May 2009, 21:33
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Store Address and Phone

The correct answer depends on "why" you are asking those questions.
07 May 2009, 22:09
#3
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Store Address and Phone

DrByte:

The correct answer depends on "why" you are asking those questions.


"Why" is a multifaceted and deep question. Does the answer to my first question depend on why I am asking? If it does, I suspect that your explanation of how the answer changes as a function of "why" will provide me with great insight into the workings of ZenCart. The first question was:

1. What is the name of the variable that is assigned the value I type into the text box labeled "Store Address and Phone"?

By the way, I've bought the book and have been continuously studying the online resources for weeks now.

Are you gonna make me :cry:?
07 May 2009, 22:12
#4
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Store Address and Phone

ver 1.3.8a
On the CONTACT US page, how can I replace the display of the text contents of "Configuration>My Store>Store Address and Phone" with the display of an image file named, for example, mystoreaddressandphone.jpg ?

ref: http://www.zen-cart.com/forum/showthread.php?t=126849
07 May 2009, 23:01
#5
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Posts:
2,276
Plugin Contributions:
0

Re: Store Address and Phone

override tpl_contact_us_default.php ..
edit the override .. by commenting or removing line 20

<address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>

this will remove the store name and address .

then go to define pages editor and add the image for define_contact_us.php from define page editor .

hope this helps.
08 May 2009, 00:57
#6
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,564
Plugin Contributions:
0

Re: Store Address and Phone

Moderator's note - 2 related threads have been merged.
08 May 2009, 02:10
#7
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Store Address and Phone


hope this helps.

tony_sar, Outstanding! Thank you so much.
08 May 2009, 02:15
#8
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Store Address and Phone

Kim:

Moderator's note - 2 related threads have been merged.

Hi Kim, I wish you did not merge the threads because although it is true that they are in some ways related, in fact I had provided a link, their purpose and scope are entirely different. If there is any way you can restore the unmerged threads, it will certainly be appreciated.
08 May 2009, 06:30
#9
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Store Address and Phone

Zean:


Part One:
1. What is the name of the variable that is assigned the value I type into the text box labeled "Store Address and Phone"?
It's not a variable. It's a constant: STORE_NAME_ADDRESS
The value of that constant is determined from the data stored in the database when you fill in the field in the admin area.

Zean:


2. Where is the file located (i.e., what is the directory and file name) that contains the code that accepts the text I input for "Store Address and Phone"?
That's complicated. Technically it's /admin/configuration.php
But, you don't want to go editing that file just to alter how you collect information for one particular constant. It's not a simple "input field" in an HTML file.

Zean:


Part Two:
The contents of the above variable (I'll call it "MY Store Address and Phone" since I don't know its actual name) is displayed on the CONTACT US page.
3. Where is the file located (i.e., what is the directory and file name) that contains the code that displays "MY Store Address and Phone" on the CONTACT US page?

I have looked in:
/includes/templates/template_default/templates/tpl_contact_us_default.php

You must have missed it, because that's the file ... as pointed out by tony_sar.
08 May 2009, 06:35
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,506
Plugin Contributions:
173

Re: Store Address and Phone

Zean:

ver 1.3.8a
On the CONTACT US page, how can I replace the display of the text contents of "Configuration>My Store>Store Address and Phone" with the display of an image file named, for example, mystoreaddressandphone.jpg ?

Well, that's "part" of the "why" behind your questions, but not all of it.
Apparently you're looking for some way to replace the normal display of your store details. You haven't explained why. Is it risk of spam? Is it fear of getting that information indexed by search engines? Is it something else?

If you were simply wanting to turn off the display of the company name/address, you could just flip it off with the admin switch in Admin->Configuration->Email Options->Contact Us - Show Store Name and Address?

I don't recommend simply inserting an HTML IMG tag in place of the address information, because the address details are added to some of the emails sent to your customers as part of order confirmation, invoices, packing slips, etc ... and those expect "text", not HTML.
Thus, if you just want to display an image instead, turn off the switch I just mentioned, and use tony_sar's suggestion of adding your image IMG HTML to the "define page" for the contact_us page.
05 Aug 2009, 23:08
#11
zean avatar

zean

Zen Follower

Join Date:
May 2009
Posts:
200
Plugin Contributions:
0

Re: Store Address and Phone

DrByte:

Well, that's "part" of the "why" behind your questions, but not all of it.
Apparently you're looking for some way to replace the normal display of your store details. You haven't explained why. Is it risk of spam? Is it fear of getting that information indexed by search engines? Is it something else?

If you were simply wanting to turn off the display of the company name/address, you could just flip it off with the admin switch in Admin->Configuration->Email Options->Contact Us - Show Store Name and Address?

I don't recommend simply inserting an HTML IMG tag in place of the address information, because the address details are added to some of the emails sent to your customers as part of order confirmation, invoices, packing slips, etc ... and those expect "text", not HTML.
Thus, if you just want to display an image instead, turn off the switch I just mentioned, and use tony_sar's suggestion of adding your image IMG HTML to the "define page" for the contact_us page.


It looks like I forgot to thank you for your help on this. Hey thanks! BTW, yes, my primary concern is that I don't want that info to be machine readable by search engine companies.