Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    Join Date
    Sep 2010
    Posts
    29
    Plugin Contributions
    0

    Default all products page says "more products coming soon" instead of products

    Hi all,

    I'm not a code person and don't know a thing about php coding. I have an issue with my site. The new products page and all products page load but it says, more products will be added soon and check back later. Same thing with my new products page.

    I have about 1100 products on the site, and recently added about 40 in the past 3 weeks so both these pages should show something.
    Google is telling me those are all error pages with soft 404's.

    My error log shows this - Invalid argument supplied for foreach() in /home/cocomilk/public_html/shoppingcart/myadminfoldername/template_select.php on line 190

    I recently added a new template everything else is working great From forums I've read here this code could be the problem and I tried the classic template and it's the same problem there.

    Below is the code from that area of the file. I was hoping someone could help me out if this is indeed my problem.



    <?php
    if($template_img_array == true){
    foreach($template_select_val['screenshot'] as $screen_shot){
    echo zen_image(DIR_WS_CATALOG_TEMPLATE . $key . '/images/' .$screen_shot, $key, 699).'<br/>';
    }
    }
    else{
    echo zen_image($template_select_img, $key, 699);
    }
    ?>

    Thanks in advance for any advice or suggestions, I appreciate it,
    Linda

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,500
    Plugin Contributions
    88

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Please refer to the "Posting Tips" and answer those questions, it will help us help you.

    That said, you didn't mention your version of Zen Cart but neither v1.5.1 nor v1.5.3 ship with a template_select.php that has even one foreach statement!

  3. #3
    Join Date
    Sep 2010
    Posts
    29
    Plugin Contributions
    0

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Sorry I will go read that now. I have version v1.3.9e
    Quote Originally Posted by lat9 View Post
    Please refer to the "Posting Tips" and answer those questions, it will help us help you.

    That said, you didn't mention your version of Zen Cart but neither v1.5.1 nor v1.5.3 ship with a template_select.php that has even one foreach statement!

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,500
    Plugin Contributions
    88

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Wouldn't you know, v1.3.9e is one that I don't have unzipped on my local system. On the other hand, the template_select.php that ships with v1.3.9f (unchanged from v1.3.9c) doesn't have a foreach statement in it either.

    Apparently, some plugin/add-on that you've installed has made modifications to that file.

  5. #5
    Join Date
    Sep 2010
    Posts
    29
    Plugin Contributions
    0

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Thank you for looking into it. The cart was working great until I added the mod for Responsive All Business Template. Any advice if everything was fine until I added this mod. I have the files saved from before the mod was added, and I have the file for after the mod was added. Would that help any ?? Or would you need more information than that ??
    Quote Originally Posted by lat9 View Post
    Wouldn't you know, v1.3.9e is one that I don't have unzipped on my local system. On the other hand, the template_select.php that ships with v1.3.9f (unchanged from v1.3.9c) doesn't have a foreach statement in it either.

    Apparently, some plugin/add-on that you've installed has made modifications to that file.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Something to note:
    Quote Originally Posted by Linda in NY View Post
    The new products page and all products page load but it says, more products will be added soon and check back later. Same thing with my new products page.
    Quote Originally Posted by Linda in NY View Post
    Google is telling me those are all error pages with soft 404's.
    Those are issues on the storefront side

    Quote Originally Posted by Linda in NY View Post
    My error log shows this - Invalid argument supplied for foreach() in /home/cocomilk/public_html/shoppingcart/myadminfoldername/template_select.php on line 190
    That message is about stuff on the admin side.
    .

    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.

  7. #7
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Quote Originally Posted by Linda in NY View Post
    Thank you for looking into it. The cart was working great until I added the mod for Responsive All Business Template.
    1. put back the previous /admin/template_select.php
    2. then use it (via your Admin) to switch back to you using your previous template

    Does the storefront problem go away?
    .

    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.

  8. #8
    Join Date
    Sep 2010
    Posts
    29
    Plugin Contributions
    0

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Thank you for responding DrByte,
    I did what you said and put the old file back. Switched back and it's still not working. I switched back for now to the new template because it's the responsive one. I guess I can leave the old file in for now because it didn't effect the functionality of the site.
    Quote Originally Posted by DrByte View Post
    1. put back the previous /admin/template_select.php
    2. then use it (via your Admin) to switch back to you using your previous template

    Does the storefront problem go away?

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Quote Originally Posted by Linda in NY View Post
    The new products page and all products page load but it says, more products will be added soon and check back later. Same thing with my new products page.

    I have about 1100 products on the site, and recently added about 40 in the past 3 weeks so both these pages should show something.
    1. The settings which control the display of products_all and products_new are found in:
    Admin->Configuration->Maximum Values
    Admin->Configuration->New Listing
    Admin->Configuration->All Listing

    Please post the settings from all 3 of those pages.

    2. The PHP files which drive those pages include:
    /includes/classes/split_page_results.php
    /includes/modules/pages/products_all/header_php.php
    /includes/modules/pages/products_new/header_php.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_all_listing.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_products_all_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_products_new_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php
    In what ways have you altered those files such that they're different from original ZC code?
    .

    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
    Sep 2010
    Posts
    29
    Plugin Contributions
    0

    Default Re: Invalid argument supplied for foreach() in template_select.php on line 190

    Admin config Maximum values All Products - it's set at 10 per screen
    Admin config Maximum values New Products - it's set at 10 per page

    New Listing (I believe these are all default I didn't change them)
    Title Value Action
    Display Product Image 1102
    Display Product Quantity 1202
    Display Product Buy Now Button 1300
    Display Product Name 2101
    Display Product Model 2201
    Display Product Manufacturer Name 2302
    Display Product Price 2402
    Display Product Weight 2502
    Display Product Date Added 2601
    Display Product Description 150
    Display Product Display - Default Sort Order 7
    Default Products New Group ID 21
    Display Multiple Products Qty Box Status and Set Button Location 3
    Mask Upcoming Products from being include as New Products 0


    All Listing ( I believe these are all default as well, I didn't change them either)


    Title Value Action
    Display Product Image 1102
    Display Product Quantity 1202
    Display Product Buy Now Button 1300
    Display Product Name 2101
    Display Product Model 2201
    Display Product Manufacturer Name 2302
    Display Product Price 2402
    Display Product Weight 2502
    Display Product Date Added 2601
    Display Product Description 150
    Display Product Display - Default Sort Order 1
    Default Products All Group ID 23
    Display Multiple Products Qty Box Status and Set Button Location 3


    Do you want to display the Product Image?

    0= off
    1st digit Left or Right
    2nd and 3rd digit Sort Order
    4th digit number of breaks after

    Date Added: 09/10/2010

    As far as Mods, the site has the Tableau Template which I added this year Nov 21 but ended up not being able to do what I wanted with it, Rustic Template which was added Oct 2010 and was the one I was using all along and Responsive All Business which I added Nov 26 of this year to get the site mobile and tablet friendly. Simple SEO URL was added back in 2010, and I added the new USPS for the Rate V4 changes that was in Early November.

    I just did the basic install on these mods, I'd have to go and ck the read me files on the mods to see how files were altered.
    Sorry I'm not being much help, as you can see I don't do a lot of mods and other things because I'm not a code person, but just follow the directions of the installs. I only do mods when necessary because I don't want to blow things up. I hope this was what you were asking me for. Sorry to be thick headed on this.
    Quote Originally Posted by DrByte View Post
    1. The settings which control the display of products_all and products_new are found in:
    Admin->Configuration->Maximum Values
    Admin->Configuration->New Listing
    Admin->Configuration->All Listing

    Please post the settings from all 3 of those pages.

    2. The PHP files which drive those pages include:
    /includes/classes/split_page_results.php
    /includes/modules/pages/products_all/header_php.php
    /includes/modules/pages/products_new/header_php.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_all_listing.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_products_new_listing.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_products_all_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_products_new_default.php
    /includes/templates/YOUR_TEMPLATE/templates/tpl_modules_listing_display_order.php
    In what ways have you altered those files such that they're different from original ZC code?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 How do I move "New Products ..." & "All Products ..." to top of category box?
    By doooomed in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 4 Mar 2013, 06:37 PM
  2. Editing the "new products" and "all products" page
    By jtimko in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Dec 2011, 10:39 PM
  3. How to remove ellipses ("...") after "All Products" and "New Products" on home page?
    By jthurman in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 18 May 2010, 03:30 PM
  4. How to display more products on the main page or "new Products"
    By corditreasures in forum General Questions
    Replies: 2
    Last Post: 9 Mar 2010, 04:03 AM
  5. Inside the "Categories" box it says "New Products" and "All Products"...
    By john9 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 25 Feb 2007, 07:55 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR