Page 26 of 43 FirstFirst ... 16242526272836 ... LastLast
Results 251 to 260 of 427
  1. #251
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi there
    I'm having some troubles inserting a product, and I'm not sure why.
    Sometimes I can insert the product on the second try, sometimes it just wont insert the product....
    I'm getting this error logs :

    Code:
    [27-Nov-2014 13:06:06 Europe/Lisbon] PHP Warning:  Invalid argument supplied for foreach() in /*******/admin/includes/modules/product_bookx/collect_info.php on line 786
    [27-Nov-2014 13:06:06 Europe/Lisbon] PHP Warning:  Invalid argument supplied for foreach() in /******/admin/includes/modules/product_bookx/collect_info.php on line 952
    The line are:
    PHP Code:
    foreach ($product_assigned_authors as $product_assigned_author) {
                              echo 
    '<div class="drop_down_div">';
                              echo 
    zen_draw_hidden_field('assigned_author_db_id[' $author_counter ']'$product_assigned_author['primary_id']);
                              echo 
    TEXT_PRODUCTS_BOOKX_AUTHOR '&nbsp;' zen_draw_pull_down_menu('bookx_author_id[' $author_counter ']'$authors_array$product_assigned_author['bookx_author_id']);
                              if (
    count($author_types_array)) {
                                  echo 
    TEXT_PRODUCTS_BOOKX_AUTHOR_TYPE '&nbsp;' zen_draw_pull_down_menu('bookx_author_type_id[' $author_counter ']'$author_types_array$product_assigned_author['bookx_author_type_id']);
                              };
                              echo 
    '</div>';
                              
    $author_counter++;
                            } 
    in netbeans there is a warning about a empty statement... but I already worked with no issues inserting other books....

    line 952 no warnings....

    PHP Code:
    foreach ($product_assigned_genres as $product_assigned_genre) {
                              echo 
    '<div class="drop_down_div">';
                              echo 
    zen_draw_hidden_field('assigned_genre_db_id[' $genre_counter ']'$product_assigned_genre['primary_id']);
                              echo 
    zen_draw_pull_down_menu('bookx_genre_id[' $genre_counter ']'$genre_array$product_assigned_genre['bookx_genre_id']);
                              echo 
    '</div>';
                              
    $genre_counter++;
                            } 
    Could this some sort of ID's issue ?

    Thanks
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  2. #252
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi
    I was checking, and just found out that it's because of the meta tags files....
    So just placing the files in modules/product_bookx , it's not going to work...

    The strange thing, it's sometimes works.....

    Placing the files there as another behavior, because of that read directory line, that places the meta tag preview into the product preview.
    Also, updating existing metatags, returns always empty tags.... so there was a problem, but I was able to insert the books and after inserting meta_tags, I knew that if I don't edit them, I would be fine.
    But not anymore.

    Ok, I know you haven't implemented the metags, but just reporting this

    Thanks
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  3. #253
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi mesnitu,

    from just checking it quickly, I would think that inserting the following lines in product_boox/collect_info.php at line 100 should work:

    Code:
    $product_assigned_authors = array();
    $product_assigned_genres = array();
    so it reads:

    Code:
    $product_assigned_authors = array();
    $product_assigned_genres = array();
    
    
    if ($pID && empty($_POST)) {
    Not sure why meta tags create this problem, but it seems that a special situation arises which means the follwing IF statement is skipped and the two arrays are not defined.

    Let me know ho you get on with this.

    Regards,
    p.

  4. #254
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi
    As usual it's looking fine now. No error logs, and now it's also possible to update existing meta_tags. :)

    Thanks !
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  5. #255
    Join Date
    Jul 2007
    Posts
    75
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi
    I've installed ZC 1.5.3 with edit orders, super orders and this mod. However, when I add a product to the shopping cart I get a warning msg, digging into the log files, it points to the
    includes/classes/shopping_cart.php file, specifically
    Unknown column 'pd.products_merkmale' in 'field list'

    Does anybody know what may be causing this?

    Thanks

  6. #256
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi Chabbu,

    please excuse, i did not get notified of your post here for some reason. I have taken the original Shopping cart class file from the german distribution of ZC, so possilby they have made a modification there? If you compare the problematic file in the BookX distribution with the original file in your distribution, then you could check if this is not in your original ZC distribution. In that case I would think you can safely remove the 'pd.products_merkmale'. (Make sure you also check closely if there is an extra colon ',' which you need to remove.

    Regards,
    p.

  7. #257
    Join Date
    Aug 2013
    Location
    Redlands, Ca
    Posts
    11
    Plugin Contributions
    0

    Default Re: New add-on "product type book" for ZC 1.5

    Has anyone gotten this to work? I tried downloading it and installing it which was not really an issue there. but I noticed there is no SQL file to add to the database and it doesn't show up in my admin area when trying to add a new book product.

  8. #258
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: New add-on "product type book" for ZC 1.5

    Hi Imagine,

    once you placed all PHP files where they need to be, you still have to run the installation script in the ZC Admin backend. This will install the necessary database tables. The installation instructions are ncluded in the distribution, did you find them?

    Regards,
    p

  9. #259
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    978
    Plugin Contributions
    6

    Default Re: New add-on "product type book" for ZC 1.5

    Hi Philou

    A question that has been on my mind for a while is why so many db tables need to be created for this mod.

    Surely by consolidating the tables, a significant reduction in the number of sql queries and amount of code would result.

    My 2c.

    ps ATM I have no need to use this mod, but there may come a day...

  10. #260
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: New add-on "product type book" for ZC 1.5

    Hi DW,

    it seemed to me the best way to do it.
    The idea is to create additional logical entities like author, series, book condition, so that the shop can filter for these. If we roll all of that into one DB table, then we could just use one of the existing modules which add extra fields to a product and then you can store your authors, series, book conditions in there. But then filtering would be quite an act.
    One further requirement was that users can choose their own options, like names of series, or type of book conditions they want to use in their shop setup. Since I am myself not using the mod in English, the mod also needs extra tables for language translations. What do you suggest we eliminate?

    I also question whether fewer tables would result in a more efficient code execution. Extra JOINS are currently needed to link up all these tables, but I would have to add JOIN clauses all the same, even if all these extra attributes would be collected in a single table.

    One thing that is indeed a bit inefficient in this mod, is that it resends some product listing database queries after I have injected the extra logic for BookX attributes, therefore querying the DB twice. This was the only way I saw how to do it using only the observer functionality of ZC, as there was no hook I could observe for to inject my extra query code. That would be a very useful addition to ZC in my opinion. The other option would be to hack the DB queries in core code, which I did not want to do to remain as forward compatible as possible and I also assumed that most users are not so happy altering ZC core code.

    Hope that answers your question ;)
    p.

 

 
Page 26 of 43 FirstFirst ... 16242526272836 ... LastLast

Similar Threads

  1. Why "No, Normal Shipping Rules" option for a "Product - Free Shipping" type?
    By ilikemike in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 31 Dec 2011, 12:34 AM
  2. Replies: 5
    Last Post: 11 Sep 2009, 04:51 AM
  3. Different "Sold Out" images for each product type
    By Starlyn in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 20 Mar 2009, 10:37 PM
  4. Remove "Add: [ ]" and "Add selected products to cart" from product pages? possible?
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Sep 2008, 03:13 AM
  5. "Array()" line on "Update Address Book" page
    By vera in forum Managing Customers and Orders
    Replies: 10
    Last Post: 22 Sep 2006, 03:06 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