-
Product Type Book (by moku)
"Product Type Book" add support for books with a new product type (just like the core music product type, but with much more features)
A thread has been started in the previous forum, now in read-only. You can check it for records here.
FEATURES
- Easy installation without touching a single core file (thanks to ZC Override System);
- Multi language friendly;
- Search books and authors with the standard search sidebox (and genre and/or types);
- Shows authors names and ISBN on product listing;
- Book attributes:
- Author (can have more than one author by book)
- Genre ("Fantastic", "SciFi", "Shonen", "############", etc.) (many genres ok)
- Type ("Artbook", "Novel", "Manga", "Postcards", etc.) (many types ok)
- Color ("B&W", "Color", etc?)
- Language (many languages ok) (use another small contribution "Products Languages")
- Condition ("Brand new", "USED (good)", "USED (bad)", etc.)
- Pages ("123")
- Publication date ("2004", "31-12-1999", etc.)
- 2 customs text fields
- 2 customs boolean fields
- Publisher and ISBN are reusing Manufacturers and Model core fields
DEMO
Demo of product book for ZenCart
DOWNLOAD
The last version is available here: Product Type Book (product_type_book-moku-v?.?-YYYY-MM-DD) (both Zip and Tar.bz2 should be available)
-
Re: Product Type Book (by moku)
Hi!
I've just installed the new version, so far everithing seems to be working fine, the bugs mentioned in the old thread disapperared.
Well done!
:thumbsup:
One suggestion to the SQL script:
For those of You, who are upgrading from a previous version (as I did) You might want to delete all previously insterted rows from the database (configuration, sideboxes, etc). The SQL script fails at some point (maybe duplicate configuration values?) if you have old data.
Here is what I did to avoid it:
DELETE FROM product_type_layout WHERE product_type_id = 7;
DELETE FROM layout_boxes WHERE layout_box_name LIKE 'book%';
DELETE FROM configuration WHERE configuration_key LIKE '%book%';
DELETE FROM get_terms_to_filter WHERE get_term_name LIKE 'book%';
-
Re: Product Type Book (by moku)
Hi ,
I am using the Book Product mod on this site <http://jimsbooks.com>
I would like to be able to display the Authors name on the list view pages
<http://jimsbooks.com/index.php?main_page=products_new>
<http://jimsbooks.com/index.php?main_page=products_all>
<http://jimsbooks.com/index.php?main_page=index&cPath=1>
How do I do it?
Thanks, TOm
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by loosefast
I am using the Book Product mod on this site <http://jimsbooks.com>
I would like to be able to display the Authors name on the list view pages
<http://jimsbooks.com/index.php?main_page=products_new>
<http://jimsbooks.com/index.php?main_page=products_all>
<http://jimsbooks.com/index.php?main_page=index&cPath=1>
How do I do it?
Hello Tom,
Your are not using my contribution but an older one wich I did not wrote, so I cannot be of any help, sorry. Good luck. ^^
PS: on my contribution authors name are shown by default in the products listings of a category or a search result as you can see here main_page=index&cPath=65 and here main_page=advanced_search_result&[...]&keyword=murata.
Actually products_new, products_all and featured_products are not supported. If somebody request it I will try to look inside this problem.
-
Re: Product Type Book (by moku)
I am also very interested in having the Author displayed on the New, All, Featured, and Search Results pages. I would see this as a neccessary feature for the book product type.
Thanks for your contibution.
-
Re: Product Type Book (by moku)
moku,
Thanks for the reply.
Do you have any recommendations on how it will or will not co-exist with the previous version of the Book Product in terms of the database tables?
Tom
-
Re: Product Type Book (by moku)
Hi,
Quote:
Originally Posted by smackjams
I am also very interested in having the Author displayed on the New, All, Featured, and Search Results pages. I would see this as a neccessary feature for the book product type.
OK, I added this to my TODO list!
(Search Results pages are already handled)
Quote:
Originally Posted by loosefast
Do you have any recommendations on how it will or will not co-exist with the previous version of the Book Product in terms of the database tables?
I don't remember well how this contrib worked in term of database, but the main thing you should check is that it does not use the ID 7 on the table "product_types" (my default is: "product_type_id = 7", as explained in the file "add_to_mysql.txt" of my contribution). Apart this, the names of the products type and keys should be differents.
Please let us know how it was!
-
Re: Product Type Book (by moku)
moku, what template are you using? Is it available for download?
Thanks,
Tom
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by loosefast
moku, what template are you using? Is it available for download?
Tom, the current template on my website is only a temporary test!! ;-)
Starting from the template_default and modifying a very few files you will achieve a far better one! :-)
-
Re: seller accepts encrypted website payments only
how do I post my question on this forum as I dont know how yet
-
Re: Product Type Book (by moku)
To start a new thread, go to the most appropriate subforum (in your case probably Configuring the Zen Cart Admin > Shipping and Payment Modules) and click the "new thread" button above the upper left corner of that list.
You will only see the new thread button when you are viewing a subcategory list, so that the forum knows where to put your post.
-
Re: Product Type Book (by moku)
-
Re: Product Type Book (by moku)
getting the following error on importing sql file:
Error
SQL query:
CREATE TABLE `zen_product_book_extra` (
`products_id` int( 11 ) NOT NULL default '0',
`book_color_id` int( 11 ) NOT NULL default '0',
`book_condition_id` int( 11 ) NOT NULL default '0',
`subtitle` varchar( 255 ) default NULL ,
`pub_date` varchar( 32 ) default NULL ,
`size` varchar( 32 ) default NULL ,
`pages` int( 5 ) default NULL ,
`misc_1` varchar( 255 ) default NULL ,
`misc_2` varchar( 255 ) default NULL ,
`misc_bool_1` tinyint( 1 ) NOT NULL default '0',
`misc_bool_2` tinyint( 1 ) NOT NULL default '0',
PRIMARY KEY ( `products_id` ) ,
KEY `color` ( `book_color_id` ) ,
KEY `condition` ( `book_condition_id` ) ,
KEY `subtitle` ( `subtitle` )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;
MySQL said: Documentation
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=latin1' at line 17
-
Re: Product Type Book (by moku)
I was able to run the query by deleting
ENGINE = MYISAM DEFAULT CHARSET = latin1
from each instruction.
using MySQL - 4.0.25-standard
-
Re: Product Type Book (by moku)
Thanks loosefast! I fixed the add_to_mysql.txt file for futures releases!
After installing and testing "Product Type Book" please let me know what you think of it. :smartass:
-
Re: Product Type Book (by moku)
This is very good for me. I have a problem, Easy Populate 1.2.5.4 can not populating all data stored with Product Type Book, and vice versa.. Easy Populate can only store all data with standard Product Type.
What should I do? Any suggestion?
TIA,
Benediktus
-
Re: Product Type Book (by moku)
Hi bene,
Quote:
Originally Posted by bene
This is very good for me.
Great! Any suggestion or idea of improvement?
Quote:
Originally Posted by bene
I have a problem, Easy Populate 1.2.5.4 can not populating all data stored with Product Type Book,
Currently I'm working to finish (as much as possible) "Product Type Book". As soon as cores features are done and works well I will work on integration with Easy Populate, RSS and so on. I added it to my TODO list. :thumbsup:
Kind regards,
--
moku
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by moku
Hi bene,
Great! Any suggestion or idea of improvement?
Currently I'm working to finish (as much as possible) "Product Type Book". As soon as cores features are done and works well I will work on integration with Easy Populate, RSS and so on. I added it to my TODO list. :thumbsup:
Kind regards,
--
moku
WOW.. you're so kindly.. I'm sure this Product Type Book would be very good for many publisher website. My company is one of very big publisher in Indonesia.
I'm waiting sir.. Thanks a lot..
Warm regards,
Benediktus
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by moku
Thanks loosefast! I fixed the add_to_mysql.txt file for futures releases!
After installing and testing "Product Type Book" please let me know what you think of it. :smartass:
Hi moku,
I am just now working with the new version of zencart (1.3.1) and your Book product module. Some observations-
I like that your module is more intergrated with the music type products and in this way it is more integrated with the zen administration section.
The author and publisher as links in book product display is a nice touch.
I like that your module allows search on author, genre, etc. The previous version of the Book Product module didi not allow these functions.
I am setting this up for a an eBay used book dealer, who may at some point have hundreds of titles in the cart, so I am a little worried about the way the pop-ups work in adding a new book product in the admin, particularly the author field, which could grow to quite a large number of names. Possibly this would be better as a text entry field?
I am going to be trying to add the author field to the product display in list view, All Products, New Products, Featured etc..as I think that is essential.
Also, I am going to see if I can populate the database fields by uploading the various cvs files required - this always gives me a big headache.
Another headache is what I perceive is inconsistency in where to go to make changes, usually quite small ones, in the zencart system. Sometimes its done in the language files and sometimes its in various template folders and sometimes its in various sections of the admin and sometimes its hard coded in the php code pages, things like break tags. For instance, the phrase about XHTML in the footer is hard coded in among the rest of the footer info which is not.
But I am grateful to the developers for making this excellent software.
Thank you for making this contrib available to the community!
-
Re: Product Type Book (by moku)
@ bene,
Unfortunately I can work on this contrib only two days by week (and I'm not a good developper!) so I'm very slow. But I need it myself, so you can believe it will be ready one day! :smile:
@ loosefast,
Quote:
Originally Posted by loosefast
The author and publisher as links in book product display is a nice touch.
I'm currently working to enhance authors, wich become a small other contrib (like "Products Languages") named "Products Persons". It will be useable by any contrib. I plan to use it in "Product Type Book", of course, but also in "Product Type Video" and a better "Product Type Music". Persons are linked to a products (ie. Book_A is linked to Person_A) but also to Roles (ie. Book_A is linked to Person_A wich have the role Role_A). For books it will mainly be Authors roles, but for video it may be Director, Actor, Music, etc.
Quote:
I like that your module allows search on author, genre, etc. The previous version of the Book Product module didi not allow these functions.
You did not notice any low speed or bad performance on this searches? I did not notice, but I wonder.
If anybody find a better way to do this search hack I will be pleased to learned from him/her.
Quote:
I am setting this up for a an eBay used book dealer, who may at some point have hundreds of titles in the cart, so I am a little worried about the way the pop-ups work in adding a new book product in the admin, particularly the author field, which could grow to quite a large number of names. Possibly this would be better as a text entry field?
That's a point I'm thinking about. A simple "text field" means that all your persons have to have differents names and that you have to know its spell exactly. I'm not sure it's a good enought solution.
I though about using Ajax to get persons' name while inputing (just like Google Suggest) but did not tried yet.
Quote:
I am going to be trying to add the author field to the product display in list view, All Products, New Products, Featured etc..as I think that is essential.
You have to look in "includes/classes/observers/class.productBookListing.php". I had to add a notifier hook in "includes/modules/product_listing.php" (that's why I overwrote it by using "includes/modules/my_template/product_listing.php") because there was no core notifier in this file. And I'm affraid it's the same for "products_all", "features_products", "products_new" and "specials"... :-(
(Note: I wonder why this four files does not use the module "product_listing" unlike "index" file?? Is it planned by ZC developpers?)
Quote:
Also, I am going to see if I can populate the database fields by uploading the various cvs files required - this always gives me a big headache.
If you can find a way to use "Easy Populate" with "Product Type Book" (and the future "Products Persons") it would be a very great help!
Quote:
Another headache is what I perceive is inconsistency in where to go to make changes, usually quite small ones, in the zencart system. Sometimes its done in the language files and sometimes its in various template folders and sometimes its in various sections of the admin and sometimes its hard coded in the php code pages, things like break tags. For instance, the phrase about XHTML in the footer is hard coded in among the rest of the footer info which is not.
Well, I though the same before starting to use it a lot. And now, I'm used to it. I don't know if ZC way of splitting things is good or bad, but I can handle it, so I'm okay with it, now! ^^
(about the validator below the footer, well, yes it's hard coded in tpl_main_page.php, but ZC is powerful enought to let us get rid of it very easily in our own templates! :wink2: )
-
Re: Product Type Book (by moku)
I just installed Product Type Book, and while I can log into the admin fine, the catalogue has gone haywire.
this is my error msg:
http://www.mysitename.com/zc_install/index.php
Finding it all abit odd, that it was working, then not working.
Zen is installed and admin area is working fine.
Tried classic template, no joy
Tried future zen template, no joy
Am running Zen 1.3
where to start looking?
-
Re: Product Type Book (by moku)
Admin now has gone dead with the same message.
I dont know where else to look, I've reuploaded the core file that was modified (includes/modules/product_listing.php)
Any ideas anyone?
Moku - this is a great mod, from what I saw before it died on me.
-
Re: Product Type Book (by moku)
Hi!
This doesn't seem to be an error message to me, it's the URL of the installer of ZC.
I'm using moku's contibution as well and I haven't experienced anything like this, so I'm a bit confused. It doesn't modify any core files, so at least your index page should work fine.
Could you post an URL to your site?
Or you might try opening http://www.mysitename.com/index.php, without the zc_install.
-
Re: Product Type Book (by moku)
Hi,
Thank you for your reply,
I know its a dud as my store defaulted to the zencart installer which I had already deleted, as part of the security protocols.
As the mod doesn't change the core files, which means I broke it somewhere on the way.
Time for a fresh vanilla install.
butterflyo
-
Re: Product Type Book (by moku)
Hi moku!
By default the authors sidebox shows every author in the database, even if you have none of their books in the store. I have a list of authors that I could upload in the DB with a simple SQL command, to make future product creation easier, but a thousand authors without a single book would result in a less than pleasant customer experience.
So, here's a quick fix for this. The SQL query is in book_authors.php, starting at line 2.
Code:
$book_authors_query = "select distinct a.book_authors_id,
book_authors_name,
book_authors_nickname
from " . TABLE_BOOK_AUTHORS . " a,
" . TABLE_BOOK_AUTHORS_INFO . " b,
" . TABLE_BOOKS_TO_AUTHORS . " c
where a.book_authors_id = b.book_authors_id AND
a.book_authors_id = c.book_authors_id
and language_id = '" . (int)$_SESSION['languages_id'] . "'
order by book_authors_name";
Cheers!
:smile:
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by MarW
By default the authors sidebox shows every author in the database, even if you have none of their books in the store. [...]
So, here's a quick fix for this. The SQL query is in book_authors.php, starting at line 2. [...]
Thanks for the fix, I merged it in the file.
And will remember this problem when working on the sidebox of "Products Persons", wich will replace book_authors in next version of "Product Type Book".
You can have a preview of a few features of "Products Persons" here -- it's still in development!
@ butterflyo
I see no reason for "Product Type Book" to broke your site. Maybe if you have installed "column/grid layout" (by DrByte) and add to it the observer/notifier hook, then the authors names and ISBN will not be inserted at the good place (or not at all) but it should not break anything.
-
Re: Product Type Book (by moku)
Hi Moku,
Just to confirm and reassure everyone,
this fantasic mod did NOT break my site.
It was an operator error.
Moku, this is an awsome mod. Thank you.
Butterflyo.
-
Re: Product Type Book (by moku)
i tried using this mod and have not been abe to get it to work.
few issues:
1. when uploading the files all i need to do is change the directory my_template to whatever named template i am using?
2. when updating our database, it says to change zc_ to whatever one likes. does this also mean where there are no longer create functions but insertions like:
INSERT INTO zc_product_type_layout (configuration_title
is the point of this line to add it in to the existing table in our database? should not the zc be removed altogether?
i basically installed the mod and then got the error when oading my site and admin page "illegal aceess". i was able to retore my site but want to still use this mod.
thanks
-
Re: Product Type Book (by moku)
it seems the source of my prblem is the auto loader files which egin with the follwoing line:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
what does this mean?
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by tekram
1. when uploading the files all i need to do is change the directory my_template to whatever named template i am using?
Yes
Quote:
Originally Posted by tekram
2. when updating our database, it says to change zc_ to whatever one likes. does this also mean where there are no longer create functions but insertions like:
INSERT INTO zc_product_type_layout (configuration_title
is the point of this line to add it in to the existing table in our database? should not the zc be removed altogether?
All (insert, create, everything) "zc_" prefixes of database names must be replaced by the prefix you choose while you installed Zen-Cart. You may have choose something like "zencart_", "zen_", "zc_", "foo_" or "" (nothing).
Quote:
Originally Posted by tekram
i basically installed the mod and then got the error when oading my site and admin page "illegal aceess". i was able to retore my site but want to still use this mod.
it seems the source of my prblem is the auto loader files which egin with the follwoing line:
if (!defined('IS_ADMIN_FLAG')) {
die('Illegal Access');
}
Are you using Zen-Cart 1.3 or 1.3.0.1 ? This contribution is designed to work with ZC 1.3 series. I don't know how it may or may not work on any previous version, and I cannot help if it's the case.
The "IS_ADMIN_FLAG" test condition is used by ZC 1.3 in all files included, not only mines. So it should not be the problem (except, again, if you are not using ZC 1.3 but a previous one).
Good luck
--
moku
-
Re: Product Type Book (by moku)
thanks that seems to have fixed the problem.
now, i was adding the db commands and got the following error:
#1062 - Duplicate entry 'SEARCH_PRODUCT_BOOK_ENABLED' for key 2
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by tekram
now, i was adding the db commands and got the following error:
#1062 - Duplicate entry 'SEARCH_PRODUCT_BOOK_ENABLED' for key 2
You tried to run theses MySQL queries many times, didn't you? This error message just says that you already have an entry for this key.
You can remove all MySQL entries by running this queries (don't forget to replace the "zc_" with your prefix!) and then running the "add_to_mysql.txt" queries again.
Code:
DELETE FROM zc_product_types WHERE type_handler = 'product_book';
DELETE FROM zc_product_type_layout WHERE product_type_id = '7';
DELETE FROM zc_layout_boxes WHERE layout_box_name LIKE 'book_%.php';
DELETE FROM zc_configuration WHERE configuration_key LIKE '%_BOOK_%';
DELETE FROM zc_get_terms_to_filter WHERE get_term_name LIKE 'book_%_id';
(I did not yet tried this delete queries. Please let me know if it does remove all entries of "Product Type Book")
-
Re: Product Type Book (by moku)
Can anyone assist?
I've been searching the files for the last four hours and haven't yet worked out how to turn off the following from displaying on the catalogue side when viewing the title.
Misc (bool) 1: Yes
Misc (bool) 2: Yes
Also I would like to get rid of the (p.) after 450:
Pages: 450 p.
I've tried to comment out the echo of the misc (bool) but no joy, and with the write a review button in the middle.
I have the side box review off both centre and middle in layout controller, but this seems to be showing up somewhere else.
I would also like to remove the bullets as well.
thank you
butterflyo
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by butterflyo
I've been searching the files for the last four hours and haven't yet worked out how to turn off the following from displaying on the catalogue side when viewing the title.
Misc (bool) 1: Yes
Misc (bool) 2: Yes
There is switches availables in the admin. Go to "Catalog > Product Types", click one time on "Product - Book" and then a second time, then click on the button "edit layout". You will be able to enable/disable a lot of thinks, among wich are "Show Book Misc (bool) 1" and "Show Book Misc (bool) 2" ;-)
Quote:
Originally Posted by butterflyo
Also I would like to get rid of the (p.) after 450:
Pages: 450 p.
You can define your own value (wich can be empty) in the language file: "includes/languages/english/product_book_info.php". Find and update this line:
Code:
define('TEXT_PRODUCT_BOOK_PAGES_UNIT', ' <abbr title="Pages">p.</abbr>');
to look like this:
Code:
define('TEXT_PRODUCT_BOOK_PAGES_UNIT', '');
Quote:
Originally Posted by butterflyo
and with the write a review button in the middle.
I have the side box review off both centre and middle in layout controller, but this seems to be showing up somewhere else.
Same that for "Misc (bool)", just go to the Product Type Book Layout Page and disable "Show Product Reviews Button".
Quote:
Originally Posted by butterflyo
I would also like to remove the bullets as well.
You should just add a CSS rule for the id "productDetailsList" in a styleseet file ("includes/templates/template_default/css/stylesheet_books.css" for exemple)
Someting like this:
Code:
#productDetailsList {
list-style-type: none;
}
Good luck!
--
moku
-
Re: Product Type Book (by moku)
Hi Moku-
I still have not gotten around to installing your Book Type mod. But I would like to.
First I need to ask a question. I have installed qhome's new "Tabbed Products ''LITE'' version - Delimiter based" v.2.5 mod.
The mod very nicely displays the product description (and other product related objects/data) in a tabbed layout on the product info page.
See http://www.zen-cart.com/forum/showthread.php?t=37182
Do you know if Tabbed Products ''LITE'' is or could be made compatible with your Book product type (or vice versa)?
Thanks.
Woody
-
Re: Product Type Book (by moku)
Hi Woody,
Quote:
Originally Posted by Woodymon
First I need to ask a question. I have installed qhome's new "Tabbed Products ''LITE'' version - Delimiter based" v.2.5 mod.
The mod very nicely displays the product description (and other product related objects/data) in a tabbed layout on the product info page.
See
http://www.zen-cart.com/forum/showthread.php?t=37182
Do you know if Tabbed Products ''LITE'' is or could be made compatible with your Book product type (or vice versa)?
As far as I saw in his contrib, its only templates modifications, isn't it?
So I'm quite sure our contribs are compatible (but have to merge files)
I think you just have to merge his tpl_product_info_display.php and my tpl_product_book_info_display.php to get both contribs cool effects :-)
--
moku
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by moku
As far as I saw in his contrib, its only templates modifications, isn't it?
So I'm quite sure our contribs are compatible (but have to merge files)
I think you just have to merge his tpl_product_info_display.php and my tpl_product_book_info_display.php to get both contribs cool effects :-)
Thanks. I will investigate.
-
Re: Product Type Book (by moku)
Moku,
Thank you for your quick response, it was the only place I didn't look, as I didn't realise you had to click twice.
butterflyo.
-
Re: Product Type Book (by moku)
thanksforthe helpmoku. i was able to install the moduleandit wokrs well.
the problem i am having now is that my search function is not working. i get an error when i try to do any search. the error is below. i have not altered the db except with the commands needed for this module. could it possiby be the source?
1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT
in:
[select count(distinct p.products_id) as total FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ) , products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND ( p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR (mtpd.metatags_keywords LIKE '%k%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%k%' AND mtpd.metatags_description !='')) ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, product_book_extra pbe, books_to_authors bta, book_authors ba, book_authors_info bai WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND pbe.products_id = p.products_id AND bta.products_id = p.products_id AND bta.book_authors_id = ba.book_authors_id AND ba.book_authors_id = bai.book_authors_id AND bai.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_authors_name LIKE '%k%'OR book_authors_nickname LIKE '%k%'OR subtitle LIKE '%k%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, books_to_genres btg, book_genre bg, book_genre_description bgd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btg.products_id = p.products_id AND btg.book_genre_id = bg.book_genre_id AND bg.book_genre_id = bgd.book_genre_id AND bgd.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_genre_name LIKE '%k%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, books_to_types btt, book_type bt, book_type_description btd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btt.products_id = p.products_id AND btt.book_type_id = bt.book_type_id AND bt.book_type_id = btd.book_type_id AND btd.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_type_name LIKE '%k%') ) ) ) ]
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by tekram
the problem i am having now is that my search function is not working. i get an error when i try to do any search. the error is below. i have not altered the db except with the commands needed for this module. could it possiby be the source?
1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT DISTINCT
in:[...]
I copy and past your SQL code into my PhpMyAdmin, added the prefix for my tables names ("zc_"), and tried it: it ran without error! (I get the result "total = 44")
My query:
Code:
SELECT count( DISTINCT p.products_id ) AS total
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND (
p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR (
mtpd.metatags_keywords LIKE '%k%'
AND mtpd.metatags_keywords != ''
)
OR (
mtpd.metatags_description LIKE '%k%'
AND mtpd.metatags_description != ''
)
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_product_book_extra pbe, zc_books_to_authors bta, zc_book_authors ba, zc_book_authors_info bai
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND pbe.products_id = p.products_id
AND bta.products_id = p.products_id
AND bta.book_authors_id = ba.book_authors_id
AND ba.book_authors_id = bai.book_authors_id
AND bai.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_authors_name LIKE '%k%'
OR book_authors_nickname LIKE '%k%'
OR subtitle LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_books_to_genres btg, zc_book_genre bg, zc_book_genre_description bgd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btg.products_id = p.products_id
AND btg.book_genre_id = bg.book_genre_id
AND bg.book_genre_id = bgd.book_genre_id
AND bgd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_genre_name LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_books_to_types btt, zc_book_type bt, zc_book_type_description btd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btt.products_id = p.products_id
AND btt.book_type_id = bt.book_type_id
AND bt.book_type_id = btd.book_type_id
AND btd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_type_name LIKE '%k%'
)
)
)
)
For your information, your query was this:
Code:
SELECT count( DISTINCT p.products_id ) AS total
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND (
p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR (
mtpd.metatags_keywords LIKE '%k%'
AND mtpd.metatags_keywords != ''
)
OR (
mtpd.metatags_description LIKE '%k%'
AND mtpd.metatags_description != ''
)
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, product_book_extra pbe, books_to_authors bta, book_authors ba, book_authors_info bai
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND pbe.products_id = p.products_id
AND bta.products_id = p.products_id
AND bta.book_authors_id = ba.book_authors_id
AND ba.book_authors_id = bai.book_authors_id
AND bai.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_authors_name LIKE '%k%'
OR book_authors_nickname LIKE '%k%'
OR subtitle LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, books_to_genres btg, book_genre bg, book_genre_description bgd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btg.products_id = p.products_id
AND btg.book_genre_id = bg.book_genre_id
AND bg.book_genre_id = bgd.book_genre_id
AND bgd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_genre_name LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, books_to_types btt, book_type bt, book_type_description btd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btt.products_id = p.products_id
AND btt.book_type_id = bt.book_type_id
AND bt.book_type_id = btd.book_type_id
AND btd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_type_name LIKE '%k%'
)
)
)
)
If you diff both codes, you will see that there is no other difference that the tables names (because I added the prefixes "zc_").
My MySQL server is version 4.1.11 (4.1.11-Debian_4sarge2-log). Maybe there is something to look on this side?
Sorry, I'm not an SQL guru :-(
If anybody else could help, please!
Regards,
--
moku
-
Re: Product Type Book (by moku)
hmmm... maybe it is MySQL cuz i am running 4.0.25. let me try to uprade and see wat happens...
(thanks for the superfast response!!!)
-
Re: Product Type Book (by moku)
Mr. Moku,
Is there any new update for Product Type Book that integrate with Easy Populate? Or whats a trick to populate thousand of items to DB with Product Type Book?
Thanks
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by bene
Is there any new update for Product Type Book that integrate with Easy Populate? Or whats a trick to populate thousand of items to DB with Product Type Book?
Actually I'm working on a great improvement of the authors features (by using another contribution "Products Persons"). So the current Book Authors infos will be changed to use "Products Persons" structure.
You can have two examples of a feature of "Products Persons" here (persons are listed in the mode 'names') and here (listed in the mode 'roles')
As soon as the cores of "Product Type Book" (and "Products Languages") are finished and useable enough, I will work on the integration with "Easy Populate".
Sorry for keeping you waiting.
Kind regards,
--
moku
-
Re: Product Type Book (by moku)
Hi Zenners,
Is it possible to relayout the admin product-book page when keying in new titles?
I would like to rearrange mine to work in my order when I'm keying in, is this remotely possible?
Could someone please point me into the correct direction - I had studied admin/product_book.php but couldn't see the order of what I was trying to do...
I had posted here but got no answer and thought perhaps I posted in the wrong forum... apologies about this..
http://www.zen-cart.com/forum/showthread.php?t=37464
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by butterflyo
Is it possible to relayout the admin product-book page when keying in new titles?
[...]
I had posted here but got no answer and thought perhaps I posted in the wrong forum... apologies about this..
I replyed there:
http://www.zen-cart.com/forum/showth...955#post214955
-
Re: Product Type Book (by moku)
Moku, you're a legend! Thank you!! :clap:
I'll have a go at the preview but my coding is zilch, so will take me a while, hopefully someone else will also jump in and contribute.
-
Re: Product Type Book (by moku)
Hey moku!
Great job on book type. Works like a charm on 1.3.1. I'm just curious if you gave any look into easy populate addon, to work with product type book?
tnx
-
Re: Product Type Book (by moku)
Mr. Moku,
How to adding Book_Authors and it's attribut (authors desc, photo, web-links, etc..) into product display?
Thanks in advance
-
Re: Product Type Book (by moku)
Great stuff moku. I abandoned my product type SheetMusic during the upgrade to 1.3.0.x in favour of your effort. However, before I hack in the Media Manager module into my copy of product type Book, has anyone else hacked it in first???
I need sheet music items to display a sample copy of the score or an MP3 sample of the piece. Guess I can just put some HTML in the product description with a link to the media but the MM seems more fun.
Cheers,
Rob
-
Re: Product Type Book (by moku)
Hi Moku, (and anyone else, chime in if you can help me)
I'm really looking forward to your final version of this. I downloaded "product_type_book-moku-v1.1-2006-04-28.zip" Is this the latest? When do you expect to finalize? (Not meaning to rush you, just wondering whether it might be easier to wait until you finish your author features, if that is happening soon.)
Also, I had previously installed a different Product Type Book (zen_demo_book.0.5) that did not work very well (at least not with ZenCart 1.3 and Chinese), so I want to delete it and replace it with yours.
- Would I have a conflict installing your book type to replace that one? (and what's the best way to do that?)
- Does your version have multi-language support?
Thanks!
-
Re: Product Type Book (by moku)
Very cool mod. It will be a great add-on to my site.
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by labrat
Great stuff moku. I abandoned my product type SheetMusic during the upgrade to 1.3.0.x in favour of your effort. However, before I hack in the Media Manager module into my copy of product type Book, has anyone else hacked it in first???
Has no one hacked in the Media Manager into another Product Type? I did once apon a time but unfortunately forgot ;-(
Oh well, I'll start again...
-
Re: Product Type Book (by moku)
What do you mean by this:
Quote:
You may have to change the default ID for "product_type_id". The default I used
is "7", but please manually check that this ID is not already used on your
"zc_product_types" table!
And what should I change this number too. I am not very familar with php, so I don't know what you are talking about.
-
Re: Product Type Book (by moku)
i got the following error while enetering in info for authors. when i hit back it would give me the same. now, i get this same error when i try to go to any page that modifies my products...
1062 Duplicate entry '0' for key 1
in:
[insert into admin_activity_log (access_date, admin_id, page_accessed, page_parameters, ip_address) values (now(), '1', 'product_types.php', '', '127.0.0.1')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
-
Re: Product Type Book (by moku)
nevermind, i thought it might have been due to this mod but it is not. i have found the soution. :)
-
Re: Product Type Book (by moku)
if i want to display books in two different laguages, i can do that by using the language feuture from this mod and not have to install another language, is that right?
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by ctcentralinfo
What do you mean by this:
"You may have to change the default ID for "product_type_id". The default I used
is "7", but please manually check that this ID is not already used on your
"zc_product_types" table!"
And what should I change this number too. I am not very familar with php, so I don't know what you are talking about.
Before installing this mod:
1. Go to your zen database in PHPMyAdmin (or whatever interface to the db you are using).
2. Select the table product_types
3. browse this table and look at the type_id is there any that are number 7? If this is a fresh install then probably not.
4. Is there a product_type_id number 7? If not then there is no problem. If so then follow the instructions in the mod on how to fix.
Good luck.
-
Re: Product Type Book (by moku)
Hi all!
Sorry to reply this late! m(_ _)m
Quote:
Originally Posted by teva
Great job on book type. Works like a charm on 1.3.1. I'm just curious if you gave any look into easy populate addon, to work with product type book?
Not yet, not yet, sorry. It will be done after finishing all the cores features.
Quote:
Originally Posted by bene
How to adding Book_Authors and it's attribut (authors desc, photo, web-links, etc..) into product display?
On the current "Product Type Book" there is nothing to do it (but it should not be difficult to code it yourself). In the future release, though, "Products Persons" is much more useful (you can track the developments changes on my website -- there is no changelog though)
Quote:
Originally Posted by labrat
I abandoned my product type SheetMusic during the upgrade to 1.3.0.x in favour of your effort. However, before I hack in the Media Manager module into my copy of product type Book, has anyone else hacked it in first???
I need sheet music items to display a sample copy of the score or an MP3 sample of the piece. Guess I can just put some HTML in the product description with a link to the media but the MM seems more fun.
Of course putting HTML is the simplier, but it would be much more interesting to use ZC features! :-)
I did not tried to look inside this, sorry.
But if you write something that can be used by more people and for books, let's try to join our effort to release a single contribution!
Quote:
Originally Posted by wickedwebs
I'm really looking forward to your final version of this. I downloaded "product_type_book-moku-v1.1-2006-04-28.zip" Is this the latest?
The latest is still "product_type_book-moku-v1.2-2006-05-12.zip" (you should find it here), wich requires "products_languages-moku-v0.1-2006-05-12.zip" (downloadable at the same location).
I think everybody already noticed it, but I've getting quite busy with other problems, so I currently don't work on "Product Type Book" as much as I would like, but it's still a work I need, so I guess we can have great hopes I will finish it! ;-)
Quote:
When do you expect to finalize? (Not meaning to rush you, just wondering whether it might be easier to wait until you finish your author features, if that is happening soon.)
Also, I had previously installed a different Product Type Book (zen_demo_book.0.5) that did not work very well (at least not with ZenCart 1.3 and Chinese), so I want to delete it and replace it with yours.
- Would I have a conflict installing your book type to replace that one? (and what's the best way to do that?)
- Does your version have multi-language support?
Yep, "Product Type Book" does support multi-languages.
I did not think of any migration tools nor any HOWTO. But as far as nor filenames nor databases tables names (or product_type_id in product_types table) conflits, I think both should work together. Before doing anything, don't forget: backup, backup, BACKUP!
Quote:
Originally Posted by tekram
if i want to display books in two different laguages, i can do that by using the language feuture from this mod and not have to install another language, is that right?
Yes, there is no need to install more ZC Store Languages. The "book languages" feature is provided by "Products Languages".
Quote:
Originally Posted by labrat
Before installing this mod: [...]
Thanks labrat!
-
Re: Product Type Book (by moku)
Hey moku!
Can you help on this issue. When i click on genre i get redirected to http://www.myurl.com/?book_genre_id=...ter=book_genre which says There are no products to list in this category. Althou there are. Any idea what's wrong?
Same thing happens if i click on author.
tnx
-
Re: Product Type Book (by moku)
with respect to multiple languages, i currently have my boks displayed in english however, the titles are actually translierarted. ie they are written in english letters. the bok titles are in arabic. i want to display the bok title in the arabic script also. what is the easiest way to do this.
thanks
-
Re: Product Type Book (by moku)
Hi tekram!
I guess it shouldn't be a problem, provided that your database settings are correct. Which means, that you use a charset (UTF-8), that can store both english and arabic characters.
Then maybe you could use the title field for arabic and the subtitle for english.
-
Re: Product Type Book (by moku)
Thanks MarW!
that is anexcelent idea. if i were to do that, would the books be searchabe by arabic and english. ie, if one pt in a search term in to the search engine, it could be put in english and arabic.
secondly, i would lke to also dispy the authors in engsh and arabic. is there an easysolution to that?
-
Re: Product Type Book (by moku)
it works!
you can searin both languages.
in terms of the authors, youan put the author names in arabic as a nickname which is displayed in parentheses with the name in english.
thanks for the advice Marw.
thanks for the mod moku.
-
Re: Product Type Book (by moku)
I would've posted the same idea, I'm glad you figured it out yourself and it works!
:lookaroun
-
Re: Product Type Book (by moku)
I was getting ready to write the following and found this thread...NEED HELP THOUGH:
Quote:
Hello all:
I am very new to the cart and I am trying to get up and running... Everything seems ot be a breeze, except for something very important to my store.
I need to create a product type: Books
I need it to have the following fields: All the usual product stuff, AND manufacturer, size, pages, author, isbn, Style... I need these set so I can have these custom fields in every book product type.
I know nothing about doing this kind of thing... detailed help would be appreciated.
Thanks...
I don't understand this... I am using the classic theme. Will this work... Can someone talk me through installing this...
-
Re: Product Type Book (by moku)
Hi!
It'll work if you use Zen 1.3 or any later versions. You can find instructions in the downloaded archive (readme.txt I guess).
In case you get stuck or need any help I'll be here tomorrow.
Good luck!
:smile:
-
Re: Product Type Book (by moku)
is there a way to transfer pre-existing products into book type?
ie f we already have a catalog up and products are of general type.
thanks
-
Re: Product Type Book (by moku)
Sure, but it'll take some SQL skills to to this.
I just had a quick look at the tables, so the list may not be complete, but you'll have to do these:
- products table: update the products_type field for every product to match the Product - Book type ID in the product_types table
- link the books to the authors, genres, etc (books_to_authors, books_to_genres, books_to_languages, books_to_types)
The first step is easy, a simple SQL update, but I'm afraid you'll have the to do the second manually, as these are different for every books.
If you have lots of books and can't figure the above out yourself, PM me and I'll try to write the SQL script for you.
-
Re: Product Type Book (by moku)
I have completely destroyed my Zen Cart...
I have tried this porduct type 2 times and I cannot get it to work... I know it is my fault and lack of experience.
CAN SOMEONE PLEASE DO THE FOLLOWING FOR ME....
Is there anyway someone can take the original zen cart program... Put in the Book Product type... Zip it up, and send it to me... That way I can just upload it, install the whole thing again... and begin the customizing I need to... Just add the type to work with the default theme that comes standard with Zen Cart!
You can e-mail the file to postmaster AT mandasystems DOT com
Thanks...
-
Re: Product Type Book (by moku)
Would like to adapt your Book product type to our needed Cars type. Only need to add single values per product: Year, Mileage. So, not needing any of the author, genre, and type tables, should I cut those bits and functions out of my version? Or can they safely be ignored? Of course, would not add the extra tables for those things. But was wondering about coding in templates and other files in your package.
Want new field Year (at least) to be searchable (search on mileage??? Could happen, I suppose). Any hints on whether that would happen automatically or if not then how to make it happen?
Thank you much,
--eon--
-
Re: Product Type Book (by moku)
I don't know if this mod is working right. I went to choose product type and all I saw was:
Product - General
Product - Music
Document - General
Document - Product
Product - Free Shipping
But when I went to the extras section book type, author, color, condition is all their. Do I need to create a product type to select from?
Please I need all the help I can get.
-
Re: Product Type Book (by moku)
I meant not working right.
-
Re: Product Type Book (by moku)
you should not have to. it should show up on its own. try instaling in again.
-
Re: Product Type Book (by moku)
is there an easy way to take books that are n an excel file and transport them in to the database as a book type product?
-
Re: Product Type Book (by moku)
I, too, am having trouble with running two languages with product type book. Also, would like to see it integrated with EasyPopulate. Any news as far as that is concerned?
-
Re: Product Type Book (by moku)
Hi folks
I don't know if Moku is on holiday :) but early on, he said someone please
modify the moku book type sql file so it works in zencart's admin patch
here's one I think works, let me know on a p.m, if it don't
http://hareslade.com/zc125/download/...u_booktype.zip
I don't know whether to switch over to moku's book type or not (I have one from an older style book type, which I developed and use on my own zc 125 site, see other threads) .. it depends whether moku is going to be around.. he seems to be away just now...
As someone said in the earlier posts, the 'hareslade' book type (that I modified from an older contrib) is not directly compatible with moku's, because of the different table layouts for book data.
However, the moku version has a more realistic table layout.. I got as far as updating my own version to beta 1.3.0 (see elsewhere), but there was a zencart bug in the copy functions in admin.. I never re-coded the correct version into the fileset..
The zencart team seem not to want to define a formal book type - there are loads of small bookshops would use it.. and now, we have two contrib versions not compatible..
I say all this.. what matters really is whether moku will support this new version through time.. I don't want to embark on using the moku version if I get lumbered with keeping it up to date :)
Any views/ appreciated...
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by hareslade
I don't want to embark on using the moku version if I get lumbered with keeping it up to date :)
Same reason why it's not built-in to Zen Cart...
Product types can make ideal contributions if they are kept up to date.
-
Re: Product Type Book (by moku)
Well what I really meant was, if zencart had a standard extended product type with say 50 basic fields/tables, when it came to deciding which 'existent' fields/tables to use in the book type, it would not be a case of inventing extra fields (with non-compatibility to other contribs) and all the probs of manually adding them one by one by field name, into the standard zen code..
As it is, both book types still use 'manufacturer' as 'publisher' - which is a nuisance sometimes.. these are choices made because of coding difficulties of adding product fields and displaying them on admin pages.. yet there has been much effort gone into zencart overrides..
Standard mega-type
So if I was inside the team, (which of course I'm not) I would be looking for a standard product type 'add on' with a load of fields/tables, creatively named 1 to 50 or more :) etc and a 'standard contrib' sql that can add those fields/tables, but selectively in an actual add on, according to need. It could even have an online admin to set up active fields selection, which creates the correct admin product page layouts....
Just a thought. The moku contrib offers a nice commonality with the music type, but moku has to add fields which are now specific to his contrib.. same as I had to, on the one I did .. should I be looking to invent a product field-creation add on?
-
Re: Product Type Book (by moku)
Moku, please, help!! Or anyone...
I've installed Product Type book and everything works fine.
The problem is if I set english language I have no problem, but if I change the language to spanish starts the problems (and I need only spanish language):
- when I want to see an author with only 1 book, it doesnīt seem to find the page: I see a blank page, or the message "there are no books...", either from the select box and from the authors name in the product info.
- if the author has 2 books, I can see the list with the 2 books of the author.(the index page).
I seems that it canīt find the product book page, if there is only one book.
Other problems I have:
- I canīt see a pop up or some page with the author information anywhere (info, url, photo, etc) even with english language, (I have no problems in the admin, I can write that info)
- and I donīt know what to do to display ALL books of a specific author, no matter the category.
ŋCan you tell me where to start to find the solutions?
Thanks a lot!!
-
Re: Product Type Book (by moku)
I had a similar problem with my install of product type book (moku version). To fix it, I ended up deleting all products and putting them in again after I had installed PTB, making sure that all language fields were filled in with data. I don't know if this could be the solution for you, but I am just telling you what worked for me. Good Luck.
-
Re: Product Type Book (by moku)
Hey!
I can't get book type to work properly. I see book and all the data, but when i want to check the author, or i click on other genres i get redirected to /?book_genre_id=5&typefilter=book_genre which puts me on the first page. This happens with author (?typefilter=book_authors&book_authors_id=2) and all others.
Any idea?
Tnx
-
Re: Product Type Book (by moku)
I've done a new ZC install of 1.3
I've imported the old database in from a 1.2.0.4 vintage ZC
I've done the install for moku's book_products instead of figuring updates to the good old 1.2/4 version - all seemed okay for a minute of course, but there is a snag
Quote:
1146 Table 'garchen_zc2006.TABLE_PRODUCT_BOOK_EXTRA' doesn't exist
in:
[select * from TABLE_PRODUCT_BOOK_EXTRA where products_id = '446']
- now I asume from my searching that there is no easy way to import the old book data into the new db structure - I'm accepting the idea of reloading everything, but how can I get past this error message ABOVE when I click on a newly created book product I just made?
This table does exist of course...
any ZCwizards out there tonight -
-
Re: Product Type Book (by moku)
when i click on a given author to see all books by that author, not all of the books show up by that author. anyoe else get this prob?
-
Re: Product Type Book (by moku)
:frusty:
Well this test is not going to well. Still can't determine why the prefix TABLE_ is being added onto
TABLE_PRODUCT_BOOK_EXTRA
Clarify, this is the error message seen when I click on a book product of old, or try even viewing the new book product listing created under Moku's
Also...
What should I do with the old tables from the previous book product type?- (Since I assume there is no easy way to drop their product data into the new table structure.)
help...
-
Re: Product Type Book (by moku)
I just installed this Zen Cart 5-in-One Product Feeds and their seems to be some kind of conflict between this mod and yours. This is the error message I am getting:
Fatal error: Cannot redeclare zen_draw_pull_down_menu_multiple() (previously declared in /home/sonny1/public_html/test/admin/includes/functions/extra_functions/product_book_functions.php:8) in /home/sonny1/public_html/test/includes/m1_export_main.php on line 300
What could be causing this?
-
Re: Product Type Book (by moku)
Well still stuck with this last detail on this test site.
I've done the install correctly, several times now...same error message when I create a new product under this product type book.
What I've got -----------
The table exists, I see it in phpMyAdmin,
I know which file is calling this [select * from TABLE_PRODUCT_BOOK_EXTRA where products_id = '446'], but no typos that I see.
----------------------
Question:
My tables have a zc_ prefix that is not showing this error message, is this a clue, or just normal?
----------------------
Plea:
I'd love some help as I'm just a carpenter/web-designer trying to give some volunteer support to a non-profit church. This database error message just has me stuck cold, everything else is finished for them but their book product type...anyone?:down:
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by teva
Hey!
I can't get book type to work properly. I see book and all the data, but when i want to check the author, or i click on other genres i get redirected to /?book_genre_id=5&typefilter=book_genre which puts me on the first page. This happens with author (?typefilter=book_authors&book_authors_id=2) and all others.
Any idea?
Tnx
i don't want to be impatient, but any idea how to solve my problem. I have just entered many books, but i can't get author or book type page to work. I get redirected to first page.
Thank You
-
Re: Product Type Book (by moku)
Hi Moku,
I've just installed product_book version 1.02 and it works great. You have asked people to comment and offer suggestions so here I go:
Firstly, a very valuable contribution, and thank you for sharing it with us.
Things I'd love to see. (Some have been mentioned before)
Product Listing
---------------------
1. Authors names to appear below title instead of above.
2. Add the word "Author(s) before authors names.
I've done both by changing code in class.productBookLiisting.php but this may be difficult for some people.
Book Info Display
------------------------
1. Author: When a person clicks on the author's name, your code takes the shopper to all books by the same author. I believe this is not a good idea. What the shopper would expect here is a popup showing information about the author along with his/her photo. You have already made provision for this information to be stored in the Admin "Authors" section and this is an ideal place to display it. A similar popup to the one used as a help screen in the shopping cart would be perfect.
A link to books by the same authors could then appear as the last item in the "Genre" section:
Genre: History
Size 9 x 3
etc.
Books by same authors: Smith, Joe & Smith, Joan
ISBN & Publisher (book info display)
-------------------------
I believe these items should appear immeadiately below the title and Author:
A HISTORY OF INDIA
Authors: Smith, Joe, Smith, Joan
Publisher: Art Press
ISBN 1234 5678 9123
(All nicely formatted of course.) I've already made these changes in product_info_display.php and it does look very good.
Authors
----------
Most people search for an author's last name so when entering authors details in the Authors section, we really should enter:
"Smith, Joan" and not Joan Smith
Unfortunately this presentation doesn't look so good when viewing the book list or book info page (see History of India above).
A better presentation would be:
A HISTORY OF INDIA
Authors: Joe Smith, Joan Smith
Publisher: Art Press
ISBN 1234 5678 9123
Can you write a string/sub-string algorythmn to convert "Smith, Joan" to "Joan Smith" for display purposes? I did this many years ago with dbase II but don't have a clue how to do it with php.
Keep up the good work, you have many admirers.
John
(P.S. I don't have the internet connected at home so I won't see any posts to my comments for at least a week.
-
Re: Product Type Book (by moku)
anyone know how to control which features are displayed? for ex i dont want ot display isb numbers.
-
Re: Product Type Book (by moku)
Hi!
1. Select "Catalog/Product types"
2. Click TWICE on "Product - book"
3. Click "edit layout"
On that page you have "Show ISBN on product listings" and "Show Model Number", try these.
Good luck!
-
Re: Product Type Book (by moku)
moku :-
I am currently using your product type to make a new Product type called "DVD" I was wondering if i could get your help with the SQL part, i don't understand it and it seems that is what allows the site to search the new product sections like "Author" and "Condition".
-
Re: Product Type Book (by moku)
Everytime i edit your Product type there seems to be less and less information displayed on the site, atm all that is left is Name and Subtitle and cost. :)
I believe it is in the Layout, when i click on the Product type "Product - DVD" and click on Edit Layout nothing is coming up like the rest of the product types, i was wondering if you new where the control for this are or what files i have to edit to get the layout working once again.
-
Re: Product Type Book (by moku)
I have it so that the options are showing up under the edit layout, in the the Admin section, but the details are still not showing up when it comes to the customer view on the shop. All that is showing up is the Title and Sub title and not the rest of the details that i have changed, does anyone have any idea where this might be fixed or what might be wrong ?
-
Re: Product Type Book (by moku)
OKey, the DVD model is finished.... Yea....
However there is only one thing left to do, i am trying to make it so that the "Starring" list of actoress is searchable, like Category and Studio is on mine, i have tried this and it didnt work too well, i was wondering if i can get your help with the last step.
Please........
-
Re: Product Type Book (by moku)
Quote:
Originally Posted by ctcentralinfo
I just installed this Zen Cart 5-in-One Product Feeds and their seems to be some kind of conflict between this mod and yours. This is the error message I am getting:
Fatal error: Cannot redeclare zen_draw_pull_down_menu_multiple() (previously declared in /home/sonny1/public_html/test/admin/includes/functions/extra_functions/product_book_functions.php:8) in /home/sonny1/public_html/test/includes/m1_export_main.php on line 300
What could be causing this?
I am getting the same error...
-
Re: Product Type Book (by moku) / sql
Hi
Looking at my moku sql, at the end it says
Code:
INSERT INTO get_terms_to_filter VALUES ('book_genre_id');
... my older mysql won't process this,
but in the zencart main sql to create a 1.3 database it say (for instance)
Code:
INSERT INTO get_terms_to_filter VALUES ('manufacturers_id', 'TABLE_MANUFACTURERS', 'manufacturers_name');
Does anyone know if the other two (equivalent) field terms should be in there inside the brackets,
in the moku version, and if this in any way will affect the search results?
-----------
Also, re the
Code:
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
my older mysql (in a windows server) objects to this, I found just remove the items coming after 'MyISAM' clears the prob.
-
Re: Product Type Book (by moku)
i upgraded to the newest version of zc and now when i click on the authors name i get the following error:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from where book_authors_id = 98' at line 2
in:
[select from where book_authors_id = 98]
-
Re: Product Type Book (by moku) Filter sql
Yes its because init_add_crumbs.php has very different code in 1.3.5 compared to 1.3.0
moku's sql had blank field entries for the get_terms_to_filter table, so use the sql below in zc admin sql patch, -- having removed the three moku book-based entries in the get_terms_to_filter table with phpmyadmin..
I used sql here which creates the three recods from scratch, so you may need to create your own 'update/insert' or 'delete first' variant, if you cannot delete the records with phpmyadmin..:
for admin sql patch...
Code:
INSERT INTO get_terms_to_filter (get_term_name, get_term_table, get_term_name_field)
VALUES ('book_genre_id','TABLE_BOOK_GENRE_DESCRIPTION','book_genre_name');
INSERT INTO get_terms_to_filter (get_term_name, get_term_table, get_term_name_field)
VALUES ('book_type_id','TABLE_BOOK_TYPE_DESCRIPTION','book_type_name');
INSERT INTO get_terms_to_filter (get_term_name, get_term_table, get_term_name_field)
VALUES ('book_authors_id','TABLE_BOOK_AUTHORS','book_authors_name');
It clears the php error, someone needs to test it, I've only got one book in my database, searches mean nothing, with only one book available :)
-
Re: Product Type Book (by moku)
is strange because my table does not have tjse other two values yu are talkin about. here is the dump from my table:
CREATE TABLE `get_terms_to_filter` (
`get_term_name` varchar(255) NOT NULL default '',
PRIMARY KEY (`get_term_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `get_terms_to_filter`
--
INSERT INTO `get_terms_to_filter` VALUES ('manufacturers_id');
INSERT INTO `get_terms_to_filter` VALUES ('music_genre_id');
INSERT INTO `get_terms_to_filter` VALUES ('record_company_id');
-
Re: Product Type Book (by moku)
changed my table so it looks like what is below and it works. thanks hareslade. any clue why my table was not updated?
CREATE TABLE `get_terms_to_filter` (
`get_term_name` varchar(255) NOT NULL default '',
`get_term_table` varchar(255) NOT NULL,
`get_term_name_field` varchar(255) NOT NULL,
PRIMARY KEY (`get_term_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `get_terms_to_filter`
--
INSERT INTO `get_terms_to_filter` VALUES ('manufacturers_id', 'TABLE_MANUFACTURERS', 'manufacturers_name');
INSERT INTO `get_terms_to_filter` VALUES ('music_genre_id', 'TABLE_MUSIC_GENRE', 'music_genre_name');
INSERT INTO `get_terms_to_filter` VALUES ('record_company_id', 'TABLE_RECORD_COMPANY', 'record_company_name');
INSERT INTO `get_terms_to_filter` VALUES ('book_genre_id', 'TABLE_BOOK_GENRE_DESCRIPTION', 'book_genre_name');
INSERT INTO `get_terms_to_filter` VALUES ('book_type_id', 'TABLE_BOOK_TYPE_DESCRIPTION', 'book_type_name');
INSERT INTO `get_terms_to_filter` VALUES ('book_authors_id', 'TABLE_BOOK_AUTHORS', 'book_authors_name');