Results 1 to 4 of 4

Re-Define STORE_NAME

This is a discussion on Re-Define STORE_NAME within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; I am trying to re-define my store name to something different than the value stored in the configuration table in ...

      
  1. #1
    New Member
    Join Date
    Nov 2004
    Posts
    6
    Rep Power
    0


    Default Re-Define STORE_NAME

    I am trying to re-define my store name to something different than the value stored in the configuration table in the database. I know that I can just change the value in the DB, but for reasons that would time a while to explain here, I would like to keep the value in the DB and then re-define STORE_NAME within my script.

    Here is some test code that I tried in the content area of one of my pages...

    Code:
    define ('STORE_NAME', 'Hello World');
    echo STORE_NAME;
    ...but it doesn't work. It still echoes the value that is in the DB, not my re-defined value.

    Anyone have any thoughts on how I can get this to work?

    Thanks so much.

  2. #2
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default RE: Re-Define STORE_NAME

    You have to ether change the database or use something other than "STORE_NAME" as your trying to overwrite a value that get re-loaded from the DB else where....

    Try using defining "STORE_NAME_TEMP" then changing all instances of STORE_NAME to STORE_NAME_TEMP where needed.

    Good Luck
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

  3. #3
    New Member
    Join Date
    Nov 2004
    Posts
    6
    Rep Power
    0


    Default

    Thanks jpf! I'm trying to avoid changing the instances of STORE_NAME. What I am trying to do is change the store name based on the domain. I have two domains pointed to the same install. I'd rather not create a new template because both stores are very similar except for the name (really that is the only difference).

    I wanted to add some simple code like this to the bottom of application_top, but as I mentioned, the define statement below won't redefine the name.

    Code:
    if ($domain == 'abc.com' ) {
      define ('STORE_NAME', 'ABC Corp.');
    } else {
      define ('STORE_NAME', 'XYZ Corp.');
    }

  4. #4
    jpf
    jpf is offline
    osCMax Testing Team
    jpf's Avatar
    Join Date
    Sep 2003
    Location
    Manitoba, Canada
    Posts
    2,688
    Rep Power
    22


    Default

    Then maybe a differnt approch....

    Multiple "Mini-Stores" with 1 Admin
    http://www.oscommerce.com/community/contributions,1534
    This you can setup several MINI stores (can have difffernt URL/looks) provided all exist on a single server. Each STORE can have the same or differnent products. In the SINGLE ADMIN interface it will tell you from which store each came from.

    If you have 2 or more domain and want to view them as differnt then this conribution is what your looking for. Note: each domain would have to be pointed to a differnt directory. (my host with my "cheap" plan will allow 3 domains to be pointed at any directory I want.... For me - ONE ADMIN and TWO sites.... - but currently only one has OSCMAX - the other is plain HTML static pages)

    or maybe

    Multi-Stores multiple shop system
    http://www.oscommerce.com/community/contributions,1730
    (Have not looked into this one much)


    Note: both are not using BTS, so changes would have to be manually done for MAX.

    Good Luck!
    JPF - osCMax Fourm Moderator - To contact, post on the forum or click here
    Try out our osCMax at: Live Catalog Demo
    Limited access Admin: Live Admin Demo
    Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!

Similar Threads

  1. Define MainPage in Admin
    By daffodil in forum osCmax v2 Installation issues
    Replies: 1
    Last Post: 07-24-2005, 10:21 AM
  2. WYSIWYG DEFINE MAINPAGE
    By jkempton in forum osCMax v1.7 Installation
    Replies: 2
    Last Post: 06-16-2005, 02:42 PM
  3. Define Mainpage
    By Chippy in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 03-15-2005, 10:56 AM
  4. How to use define mainpage? lost and need help
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 07-02-2004, 12:45 AM
  5. define mainpage
    By jloyzaga in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 01-19-2004, 11:44 AM

Bookmarks

Posting Permissions

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