Page 2 of 8 FirstFirst 1234 ... LastLast
Results 11 to 20 of 76
  1. #11
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Display child categories of a parent in categories sidebar

    The way designed for ZC to use one database for three stores is to use a different database prefix (DB_PREFIX) for each database. Now, what that does is entirely split the storage so that everything is independent but within a single database.

    I guess, to possibly share specific related information, each of the store's TABLE_my_table definitions where my_table represents a specific constant for a given table could be modified to all point to a single shared table, but things like updates would have to be coordinated between the 2+ stores so that there wouldn't be any conflict in operations using tables that might need updating.

    It's an idea, but still not seeing the reason for using a single database whether it is a usage "limitation" or what is desired to be gained by using such a single database. The probs of which schoolboy has probably only begun to describe.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #12
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Display child categories of a parent in categories sidebar

    It's not so much about what the customer is doing... it's about how the technology handles it. You mention wordpress in an earlier post - suggests you are more familiar with this than zencart. Wordpress's database is as "flat as a pancake" in comparison to the inter-relational structure in zencart. Wordpress is popular because it (natively) does very little database-wise, and relies on code "widgets" and very, very heavy css and javascript to render pages.

    What if the customer wants to REMOVE or ADJUST the Cart A items (they are now in Cart B)? What if they want to search for or find that item (now "hidden" in most respects).

    Again... without full insight into your objectives, it's really not possible to offer suggestions - other than to point out that there are several HUNDRED functional issues that have to be seriously considered.

    But as I say... good luck with the space shuttle. I'm going to take a walk to the corner shop - much easier!
    20 years a Zencart User

  3. #13
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Display child categories of a parent in categories sidebar

    Quote Originally Posted by Nick1973 View Post
    Ok let me explain. I have three carts that all use the same database. Each cart has its own categories, but it would be confusing to display categories from Cart A in Cart B and vice versa.

    I have tried using multi cart to associate categories to the correct cart, but this doesn't work as multi cart relies on using a different template for each cart and because each cart uses the same database I cannot change templates. The only way I can use multi cart is by using different domain names for each cart, however each cart has to have its own directory under one domain name. Multi cart won't work with sub directories, I have tried this route and came to the conclusion that it was easier just to duplicate one cart three times with the same configuration files. ...
    The Multi-Site Module (MSM) places no requirement on each "store" having a different template. While the as-distributed version of the MSM makes a distinction between different domain names in the URL, I don't think that it would be a stretch in your case to modify its "config_sites.php" processing to recognize that a different directory in the URL maps to a different store.

    That slight modification, with some .htaccess magic would allow you to use the MSM for your situation. The .htaccess addition would be to rewrite any access to www.example.com/store1, www.example.com/store2 or www.example.com/store3 to a single file-system instance of Zen Cart that would serve all three stores. That way, you'd have your three stores and a single admin.

  4. #14
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Display child categories of a parent in categories sidebar

    You would also not be able to install any modules that either create new tables/fields, or which make relational calls to the dbase - basically meaning you can't use any plugins (unless they are modified to suit the new architecture). This can be a problem:

    Consider... generation of XML sitemaps for search engine use, or product feeds for Google Merchant Centre, or embedding of Google analytics mods which store much of the config data in the database - particularly with regard to enhanced marketing and remarketing.

    All in all... a bad idea... Really... you need to re-think this.
    20 years a Zencart User

  5. #15
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Display child categories of a parent in categories sidebar

    Look, schoolboy, if you can't answer the question don't answer, simple as that. I am very familiar with Zen Cart and Wordpress.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  6. #16
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Display child categories of a parent in categories sidebar

    Quote Originally Posted by Nick1973 View Post
    Ok let me explain. I have three carts that all use the same database. Each cart has its own categories, but it would be confusing to display categories from Cart A in Cart B and vice versa.

    I have tried using multi cart to associate categories to the correct cart, but this doesn't work as multi cart relies on using a different template for each cart and because each cart uses the same database I cannot change templates. The only way I can use multi cart is by using different domain names for each cart, however each cart has to have its own directory under one domain name. Multi cart won't work with sub directories, I have tried this route and came to the conclusion that it was easier just to duplicate one cart three times with the same configuration files.

    The problem with this is that all categories display in all carts. So, if I associate Cart A Categories with a Cart A Parent then I can display Cart A Parents Child Categories in Cart A. The same would be done for Cart B, and Cart C.

    Unless you know of a different way to associate different categories to different carts using one database? I did think about applying a class so I could hide categories in the stylesheet. But of course if there's a cleaner and better way to do this with PHP that would be best.
    Quote Originally Posted by lat9 View Post
    The Multi-Site Module (MSM) places no requirement on each "store" having a different template. While the as-distributed version of the MSM makes a distinction between different domain names in the URL, I don't think that it would be a stretch in your case to modify its "config_sites.php" processing to recognize that a different directory in the URL maps to a different store.

    That slight modification, with some .htaccess magic would allow you to use the MSM for your situation. The .htaccess addition would be to rewrite any access to www.example.com/store1, www.example.com/store2 or www.example.com/store3 to a single file-system instance of Zen Cart that would serve all three stores. That way, you'd have your three stores and a single admin.
    If in the end the multi-site module is usable to what is desired/expected and the above chunk of assistance was helpful, then perhaps it needs to be iterated (probably more like reiterated) in the multi-site module thread. Perhaps also added to the instructions of the module as a possibility or framed differently, etc...

    Otherwise if that doesn't "fully" resolve the desired state, it would be helpful to have further explanation of the overall intent to try to support rapid likely sustainable resolution helping you to move on to the next great project.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #17
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Display child categories of a parent in categories sidebar

    Quote Originally Posted by lat9 View Post
    The Multi-Site Module (MSM) places no requirement on each "store" having a different template. While the as-distributed version of the MSM makes a distinction between different domain names in the URL, I don't think that it would be a stretch in your case to modify its "config_sites.php" processing to recognize that a different directory in the URL maps to a different store.

    That slight modification, with some .htaccess magic would allow you to use the MSM for your situation. The .htaccess addition would be to rewrite any access to www.example.com/store1, www.example.com/store2 or www.example.com/store3 to a single file-system instance of Zen Cart that would serve all three stores. That way, you'd have your three stores and a single admin.
    Yes I've already been down the route of Multi Site and tried using it for sub directories. Really all I'm wanting is one single login for all three carts, which means that they have to use the same database. All three carts do have different categories associated to them, but I don't want to display catagories from site a on site b and vice versa. There isn't any space shuttle ideas behind it really like schoolboy keeps ranting on about. The products are related to one another and the carts all look relatively the same, except they are different colours. I want customers to be able to add products from site a in site b and vice versa as they are relational products anyway so it doesn't matter. Why I want to do this doesn't matter to anyone, what matters is I get an answer without any comments about what I know and why I am doing what I'm doing like schoolboy appears to make. I came on here to ask a question, not to be rediculed by someone. As its a forum that is used mostly by professionals I expect professional replies without any digression. I don't think that is too much to ask. If what I am asking can't be done or can't be done easily, just say, no need to digress and start picking pieces as to why I want to do what I want to do.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  8. #18
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Display child categories of a parent in categories sidebar

    So can my question be done or do I have to resort to having three independent carts? It's not ideal really as that means customers have to sign up three times if they want to buy from each cart.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  9. #19
    Join Date
    Sep 2008
    Location
    Cleethorpes
    Posts
    1,227
    Plugin Contributions
    6

    Default Re: Display child categories of a parent in categories sidebar

    Oh and sorry lat9, I was aiming my previous comments at Schoolboy, not you. There's nothing wrong with your answers.
    Nick Smith - Venture Design and Print
    https://venturedesignandprint.co.uk

  10. #20
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Display child categories of a parent in categories sidebar

    Quote Originally Posted by Nick1973 View Post
    So can my question be done or do I have to resort to having three independent carts? It's not ideal really as that means customers have to sign up three times if they want to buy from each cart.
    So regarding the three independent logins, that was part of where I was going with possibly all three store's "customer" related data pointing to a single set of tables. This way, you could have three independent stores but one set of login credentials centrally maintained.

    Could you however, after taking a little bit of a breath clarify the two conflicting statements from this portion of the previous reply?

    but I don't want to display catagories from site a on site b and vice versa. There isn't any space shuttle ideas behind it really like schoolboy keeps ranting on about. The products are related to one another and the carts all look relatively the same, except they are different colours. I want customers to be able to add products from site a in site b and vice versa as they are relational products anyway so it doesn't matter.
    May just be a typo, but again understanding the goal helps with providing/discussing a solution.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 8 FirstFirst 1234 ... LastLast

Similar Threads

  1. Conditional Statement - Parent and Child Category Display Additional Information
    By crlannen in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 6 Feb 2011, 04:13 AM
  2. Category Filter - Display Parent categories
    By djdavedawson in forum General Questions
    Replies: 1
    Last Post: 5 Oct 2010, 10:08 PM
  3. Enable Links for Parent Categories in Categories Sidebox
    By MrsQ in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Sep 2009, 08:25 PM
  4. display all main parent categories(with category images) on a page
    By vandiermen in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 May 2009, 01:36 AM
  5. Parent... Child... Sub.... CATEGORIES
    By eliza-bee in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 12 May 2009, 03:03 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR