Zen Cart Logo
Forums / Setting Up Categories, Products, Attributes / Product Type Book (by moku)

Product Type Book (by moku)

Views: 203,541

Results 1 to 20 of 647
12 May 2006, 6:37 AM
#1
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

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

  1. Easy installation without touching a single core file (thanks to ZC Override System);
  2. Multi language friendly;
  3. Search books and authors with the standard search sidebox (and genre and/or types);
  4. Shows authors names and ISBN on product listing;
  5. Book attributes:
  • Author (can have more than one author by book)
  • Genre ("Fantastic", "SciFi", "Shonen", "Hentai", 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)

13 May 2006, 1:37 PM
#2
marw avatar

marw

New Zenner

Join Date:
Feb 2006
Location:
Hungary
Posts:
39
Plugin Contributions:
0

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%';

17 May 2006, 7:09 AM
#3
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

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

17 May 2006, 7:27 AM
#4
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

Re: Product Type Book (by moku)

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.

20 May 2006, 4:23 PM
#5
smackjams avatar

smackjams

New Zenner

Join Date:
May 2006
Posts:
8
Plugin Contributions:
0

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.

20 May 2006, 7:30 PM
#6
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

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

21 May 2006, 2:21 AM
#7
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi,

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)

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!

22 May 2006, 5:19 AM
#8
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

Re: Product Type Book (by moku)

moku, what template are you using? Is it available for download?

Thanks,

Tom

22 May 2006, 5:30 AM
#9
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

Re: Product Type Book (by moku)

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! :-)

22 May 2006, 5:32 AM
#10
petronew avatar

petronew

New Zenner

Join Date:
May 2006
Posts:
7
Plugin Contributions:
0

Re: Product Type Book (by moku)

how do I post my question on this forum as I dont know how yet

22 May 2006, 4:11 PM
#11
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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.

22 May 2006, 5:04 PM
#12
petronew avatar

petronew

New Zenner

Join Date:
May 2006
Posts:
7
Plugin Contributions:
0

Re: Product Type Book (by moku)

thanks for your help

23 May 2006, 12:42 AM
#13
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

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

23 May 2006, 1:15 AM
#14
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

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

23 May 2006, 3:30 AM
#15
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

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:

23 May 2006, 10:02 AM
#16
bene avatar

bene

New Zenner

Join Date:
Feb 2006
Posts:
9
Plugin Contributions:
0

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

23 May 2006, 2:25 PM
#17
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi bene,

bene:

This is very good for me.

Great! Any suggestion or idea of improvement?

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

23 May 2006, 4:24 PM
#18
bene avatar

bene

New Zenner

Join Date:
Feb 2006
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

23 May 2006, 9:29 PM
#19
loosefast avatar

loosefast

Zen Follower

Join Date:
Jun 2005
Posts:
199
Plugin Contributions:
0

Re: Product Type Book (by moku)

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!

24 May 2006, 12:20 AM
#20
moku avatar

moku

New Zenner

Join Date:
Mar 2006
Location:
Japan
Posts:
49
Plugin Contributions:
0

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,

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.

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.

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.

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?)

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!

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: )