Re: New add-on "product type book" for ZC 1.5
I see what you are saying, although I wonder whether some of the filters could be replaced by onscreen sorting - a bit like asc/desc anchors in some (mostly admin) pages. From my perspective as a user, I prefer being able to sort results found before refining or conducting a new search.
FWIW I was looking at this mod to see if could do something else, equally complex, only to be stumped by the code. I anticipate having another look at the inner workings in the not too distant future, when I am closer to resolving what I want to do
Re: New add-on "product type book" for ZC 1.5
Hope the BookX mod will be helpful to what you are planning to develop.
Best regards,
p.
Re: New add-on "product type book" for ZC 1.5
Hi
By the way Philou, still no idea when a csv import for this module comes alive :smile: ?
Re: New add-on "product type book" for ZC 1.5
Hey mesnitu,
nice to hear from you :)
The CSV import is not really a big priority I'm afraid, especially since all the attributes which have user defined entries (i.e. anything "BookX" under the "Extras" menu, like conditions, authors, series etc.) could not easily be assigned via CSV. So the only values which could be assigned via CSV import would be ISBN, number of pages, publishing date.
Workaround: If you use another zen cart CSV import tool to import books as general products first, then you can pick and choose which of these to convert to "BookX" type in the "Tools" Menu "BookX Tools". That should get you most of the way a BookX CSV import could take you. If you are comfortable with MySQL you can export the table "product_bookx_extra" and add the pages, volume, isbn etc and load the table back in. If you only add info to existing entries that should work without any problems.
Sorry I can't announce a solution to this, but in fact it is not a problem that can satisfactorily be solved ...
Best regards,
p.
Re: New add-on "product type book" for ZC 1.5
Hi
Yes, I already did that once, but it was for all the products. Not a easy process for every time one need to upload 50 or 100 products (for all the fields). I mentioned this, because of the comments about the tables and all the joins.
I was making one, base on EP (they have a import for music products), but I had to stop, cause another site come around, but I'm nearly finishing it.
I'll give it a go, but I guess if you said that it can not easily be assigned via csv, probably i'll stuck.
For me, the author, publisher, genre, pages, isbn, date and book cover, fulfill my needs.
Let's see what happens.
Best regards
Re: New add-on "product type book" for ZC 1.5
Hi mesnitu,
author, publisher and genre are the problems, because they link to another table. You have discovered that you can assign a genre / author / publisher to multiple bookx products at once from the form where you enter author etc. info under EXTRAS menu, yes?
Best regards,
Philipp
Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
Hi mesnitu,
You have discovered that you can assign a genre / author / publisher to multiple bookx products at once from the form where you enter author etc. info under EXTRAS menu, yes?
Yes, but not sure what if I follow what you mean... As I remember the music products also work with different tables, record companies, etc... but the association is simpler then bookx.
For a complete csv import, with all the user choices, etc, it's complicated.
Have you ever seen Easy Populate ?
Do you think this is a impossible mission ?
All I was doing was "study" bookx query's and try to adapt at EP... but if you find it hard to do it.... my mojo is low now :)
Any way in a couple of week I'll update zencart to 154, and I'll dig into it a bit more. If I can't achieve the quest, well.....the world will survive :)
Best regards
Re: New add-on "product type book" for ZC 1.5
Dear mesnitu,
I'm not so familiar with the music type, but the main problem is this: you have a table of (user defined) authors A, B and C. They have IDs 1, 2, 3 in their table "bookx_authors". Now in your CSV file you would need to know the ID of the author of the book, so that the import script can link the book to the correct author. The same is true for series, publishers etc. How will you know all these numercial IDs ?
Matching by name of the author or series is theoretically possible, but your spelling would have to be 100% identical to the spelling in the database. Not impossible but the work needed to make that import solution work is really a lot and it is not the main focus of this add-on... :)
Regards,
p.
Re: New add-on "product type book" for ZC 1.5
Hi
But aren't the query's similar to the ones that display the book info on the site ?
Your mention some (user define tables), I'm not sure what that is (I use bookx with not much customization on the config side), but I guess it's require to match or join 3 tables, the extra, the authors id and the authors name. EP uses a "^" for multiple categories. In this case, it's to adapt to multiple genres and authors. Something like Author1^Author2.
ps: By the way, I'm updating to 154. Is the latest Bookx working with this version, and is the latest version of bookx in the same place or in zencart site ?
Thanks
Best regards
Re: New add-on "product type book" for ZC 1.5
Hi mesnitu,
I cannot verify right now that BookX works with 1.5.4 but I don't see what would break it, since not much seems to have changed in the core functionality.
I went through great efforts to make BookX as independent of core changes/updates as possible, so hopefully that pays off now :)
Back to your question of import:
It is quite easy to assemble a query from multiple tables for data already in the DB, like "get me all genres assigned to a book with ID 3". But the query "insert a book and link it to multiple genres" is not so easy, because the user (you!) have to tell the import script which genres you mean. But the database thinks in terms of "genre with ID #34" and not "genre called 'crime novels' ". So when you import via CSV, you have to create an entry like this
bookx title ---- ISBN ---- author ID --- author ID --- genre ID ---- Series ID
War&Peace ---- 978-1-234567-89-0 ----- 324 ---- 76 ---- 12 ---- 32
How will you know what ID all the authors have and the genres etc?
You could try to have the script look up the genres and the series based on their naming, but if you only make one spelling mistake there will be no match. So you import 100 books and on five there will no match of author. Have you misspelled the author? Does the author not exist in the DB? The same about genre, series etc etc.
So of course this is possible, but to do it "right" it is a very complex logic.
I hope I could explain it well :)
p.