Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Turning Shopping Cart On/Off By Category

    Hey everyone!

    So far I've just lurked these super helpful forums, but now I'm hoping someone will be able to help me as a newbie!

    I convinced the company I work for to use zencart but they give me sheets of paper with drawings on it to illustrate what they want.

    Well, mostly this involved me turning off all sideboxes, etc in Layout Boxes Controller and making my own template to match our current site: http://www.crystalvalley.com/zencart/

    OK, so! I want all categories (for now) to have no option to buy the products (we have distributors who sell them) EXCEPT the category [B]Banner Hardware[/B].

    What do you think?

    Basically I want to turn back on the shopping cart box for add to cart on just one category.

    Help!

    Thanks in advance,
    mike (smallarmsdealer)
    Last edited by smallarmsdealer; 25 Oct 2007 at 10:31 PM.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Turning Shopping Cart On/Off By Category

    The Gallery Category mod will do what you need. Turn the cart back to full normal function, and add all the categories except the Banner Hardware to the Gallery Category list per the directions in the readme. If you want prices to show for the gallery categories, there are directions for disabling the "hide price" function.

    You can remove any categories from the gallery function at any time.

  3. #3
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Turning Shopping Cart On/Off By Category

    You might also spank this up a bit by adding appropriate images to each category that will display just over the text for each in the center area
    Zen-Venom Get Bitten

  4. #4
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Turning Shopping Cart On/Off By Category

    Thank you, GJH42!

    I will try that and report back to the thread!

    This will just about make my day if this works!

  5. #5
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Turning Shopping Cart On/Off By Category

    @kobra:

    Duly-noted, my friend.

    I was thinking the same thing yesterday. That would spice things up!

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Turning Shopping Cart On/Off By Category

    If you have images for these then

    admin > catalog > categories/products > select category and the edit function > towards the bottom you can browse to the image on your local and update/preview
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Turning Shopping Cart On/Off By Category

    Just wanted to write back to the thread -- so far I've downloaded/unzipped the Gallery Category Mod, renamed the proper folders to my custom template, and uploaded it to the root zencart folder. I guess it doesn't show up under Tools like Image Handler (drats!)

    I'm working on following these directions, one question that popped up was in editing the product_listing.php file per Gallery Category's read me. It says to replace the default 23 to hide that category, but how do I do multiple? In my case, all except for one category (category 22).

    Stumbling along here, Friday is a tough day to get any real work done!

  8. #8
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Turning Shopping Cart On/Off By Category

    The readme explains (at the bottom) how to add multiple category ids to the list.

    ##########################################################################################____

    If you wish to have multiple categories or subcategories display as galleries, you can add them to the list in this line:

    if (ereg("(^23$|^23_)",$cPath)) {

    ^23$ means "exactly 23", | means "or", and ^23_ means "begins with 23_".
    To add category 2 and subcat 7_13, the list would look like this:
    (^23$|^23_|^2$|^2_|^7_13$) and the whole line would look like this:

    if (ereg("(^23$|^23_|^2$|^2_|^7_13$)",$cPath)) {
    ##########################################################################################____

  9. #9
    Join Date
    Oct 2007
    Posts
    16
    Plugin Contributions
    0

    Default Re: Turning Shopping Cart On/Off By Category

    OK, I edited both tpl_product_info_display.php and product_listing.php with this string:

    if (ereg("(^5$|^5_|^6$|^6_|^7$|^7_|^8$|^8_|^9$|^9_|^10$|^10_|^11$|^11_|^12$|^12_|^1 3$|^13_|^14$|^14_|^15$|^15_|^16$|^16_|^18$|^18_|^19$|^19_|^20$|^20_|^21$|^21_|^2 3$|^23_|^24$|^24_)",$cPath))

    All of those categories being the categories I don't want product to be bought on/in. Categories I do want: 17 (banners) and 22 (banner hardware).

    I think I've edited out some other stuff when making zen cart fit in with our site...I've enabled shopping cart to be right and have global right column enabled. See nothing. I'll try to enable more and more here, but so far I think i need to go back in and find some code.

    OK -- I see the importance of notes and commenting what I've commented out!

  10. #10
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Turning Shopping Cart On/Off By Category

    The categories you want to use are actually subcategories, and need to be specified as such in the ereg list.
    "Banners" cPath=3_17
    "Banner Hardware" cPath=3_4
    (both should not be in the ereg list)
    If you don't want Banner Enhancers (cPath=3_18) functional, then you need to include that in the ereg list.

    Since cPath 3 is not in your current list and not subject to gallery treatment, but still not showing cart function, you obviously have a bunch of things to restore in the code.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Trouble turning off shopping cart weight, total etc
    By shocker in forum Basic Configuration
    Replies: 12
    Last Post: 23 Sep 2009, 11:55 PM
  2. turning shopping cart off
    By stefaaaan in forum Basic Configuration
    Replies: 2
    Last Post: 28 Apr 2009, 12:16 AM
  3. Turning off category turns off linked products in other categories
    By emiLy in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 4 Feb 2009, 10:50 PM
  4. Turning off Category-Tabs Menu also turns off logo in IE7
    By Rubylily in forum Customization from the Admin
    Replies: 1
    Last Post: 25 Jun 2007, 04:43 PM
  5. Can't seem to turn bold off subcategory without turning off bold on top category
    By immersive in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 30 Dec 2006, 09:15 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