Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Store Address and Phone

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

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Re: Store Address and Phone

    Quote Originally Posted by DrByte View Post
    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 ?

  4. #4
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Contact US image display

    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

  5. #5
    Join Date
    Jul 2006
    Location
    Montreal, Canada
    Posts
    2,279
    Plugin Contributions
    0

    Default Re: Contact US image display

    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.

  6. #6
    Join Date
    Jun 2003
    Posts
    33,721
    Plugin Contributions
    0

    Default Re: Store Address and Phone

    Moderator's note - 2 related threads have been merged.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  7. #7
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Re: Contact US image display

    hope this helps.
    tony_sar, Outstanding! Thank you so much.

  8. #8
    Join Date
    May 2009
    Posts
    186
    Plugin Contributions
    0

    Default Re: Store Address and Phone

    Quote Originally Posted by Kim View Post
    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.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Store Address and Phone

    Quote Originally Posted by Zean View Post
    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.

    Quote Originally Posted by Zean View Post
    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.

    Quote Originally Posted by Zean View Post
    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Contact US image display

    Quote Originally Posted by Zean View Post
    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.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Remove Store Name, Address, Phone etc, from Contact Us Page
    By Lawbird123 in forum Managing Customers and Orders
    Replies: 6
    Last Post: 8 Oct 2009, 07:19 AM
  2. Store Name, Address and Phone Number In Emails
    By CelticKatt in forum General Questions
    Replies: 0
    Last Post: 28 Apr 2009, 12:13 AM
  3. Store address and phone in different languages
    By soki in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 5 Aug 2008, 11:35 PM
  4. UK Paypal System - address and phone info
    By PotzUK in forum Addon Payment Modules
    Replies: 9
    Last Post: 28 Mar 2007, 04:34 PM
  5. Turn off store address/phone at top of contact us page
    By audradh in forum Customization from the Admin
    Replies: 1
    Last Post: 10 Aug 2006, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg