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

Product Type Book (by moku)

Started by moku on 12 May 2006, 6:37 AM · Views: 203,732

Results 221 to 240 of 647
11 Jun 2007, 9:43 AM
#221
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Product Type Book (by moku)

Hi Hareslade,
I've added your book product type and it's looks great. Thanks for your work on this. I also visited your site and I really liked your grid layout once I clicked on 'Mystery Books'. How do I get this layout?
I tried to install the grid layout that comes with Moku's extended book download but that didn't seem to work. Now I'm thinking it may be the Gallery_JPH download under your ZC-1.3.7 link. Can you tell me which will work for me?
Thanks,
Bearaman

11 Jun 2007, 12:26 PM
#222
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi
bearaman
I am not sure what the original moku book version does, you could apply the dr.byte grid layout contribution to it and get grid, but thats not what I did...

The 1.3.7 version you see on my hareslade site is as you say, the 'jph' one that is in the downloads section on my site, and the page grid design is css controlled so you need a copy of stylesheet_list_columns.css from the classic folder if you're not using classic template.
http://www.hareslade.com/zc/index.php?main_page=document_general_info&cPath=51&products_id=482

For some reason I control each grid (book block) in the product listing with a px pixel value, which you'll find settable in admin, under edit layout of book type.

In the file package there is the basic fileset (and sql in 'RUN_THIS_SQLPATCH_FOR_DATABASE') that creates the book type, all in folder 'EXTENDED_BOOK_MAIN_FILES'. Use \catalogue...

Then there is another folder 'EXTENDED_BOOK_OPTIONAL_GRID_LAYOUT_FILES' which you upload as well after the above files. This second folder has the grid modifications files, and another small sql patch.

In order to enable the grid layout, just for books, you lastly need to add/edit the 'product type' of each zc category that your books are in, to 'product book only' (or similar). Grid layout won't fire up without that being done.

(Somewhere in the 'defines' files is the numeric setting for equalling the book product type value in the database, but you won't need to alter that unless you have changed the numeric setting for the book product type itself.)

btw my replies may be intermittent, I'm out and about just now

12 Jun 2007, 9:46 AM
#223
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi Again,
Got the grid layout working and it looks great! Just a word on how I actually installed it. I first had to install Dr. Byte's grid contribution. Once I got this working, I then added your own grid files. This gave me the grid layout that can be seen on your site. Not sure if this is the correct way to do it but it worked anyway!
One last thing - how do I get a "buy" button to appear on each book on the grid?
Thanks again,
Bearaman

12 Jun 2007, 10:41 AM
#224
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

bearaman
look in admin | configuration | product listing | Display Product Add to Cart Button (0=off; 1=on; ....

That can turn on buy now

Note the fields displayed (ISBN, Author) are handled by a special book 'observer' file using the zencart system.

Also includes\modules\product_listing.php has some preset true/false settings at the top, but ignore the 'gallery' ones. That file matches my gallery contrib if anyone ever installs both book and gallery product types, this file controls the product listing display of course..

14 Jun 2007, 9:15 AM
#225
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Re: Product Type Book (by moku)

Perfect. Looks great! Thanks for your help.
One thing I can suggest; if you set the height in your css file to height:150px; then you can get all your book product boxes to have the same height.
Thanks,
Bearaman

14 Jun 2007, 6:51 PM
#226
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi bearaman
got a demo anywhere of the 'set the height mod'? Why didn't I think of that...

21 Jun 2007, 9:04 AM
#227
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Re: Product Type Book (by moku)

Sorry for the delay...to get all the boxes into and equal height and also add a nice dashed border, just update the stylesheet_list_columns.css with the following:

/* contents */
div.centerBoxContentsProductsCols{
	margin: 5px;
    	padding: 5px;
	background-color:#FFFFCC;
	border:4px;
	text-align:center;
	height:290px;
	border-style:dashed;
}

I haven't checked it out of FF but it looks fine on IE6.

21 Jun 2007, 9:08 AM
#228
bearaman avatar

bearaman

New Zenner

Join Date:
Jun 2006
Posts:
57
Plugin Contributions:
0

Re: Product Type Book (by moku)

OK, now for my question. How do I change the width of the columns on your grid display? I tried changing the value in config - product listing - column width but that didn't do anything. I also tried running the sql script with my new value but I got an error and the change was ignored. Any ideas?
Thanks,
Bearaman

23 Jun 2007, 4:13 PM
#229
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

bearaman, expect you found it
I think display block column width is defined in the book type edit layout, look for a '170 px' in the list

23 Jun 2007, 5:12 PM
#230
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi
Announcing Version 3 which replaces my Version 2 for zencart 1.3.7

What you need to know is:

BETA1 (but fully working) download zip is at:
http://www.hareslade.com/zc125/downloads/test_zips/BETA1_ML_ZC1_3_7_EXTENDED_BOOK_TYPE_V_3_LANGS.zip

SINGLE LANGUAGE DEMO:
http://www.hareslade.com/zc137_t4bk/index.php?main_page=product_book_info&cPath=65&products_id=183

MULTI-LANGUAGE DEMO (note, the English labels for book were just prefixed for other languages display, e.g with 'SC' on schinese pages):
http://www.hareslade.com/zc137_t5bkm/index.php?main_page=product_book_info&products_id=181

You can use the V3 in Single language, but its fully equipped to handle multiple languages. Its a full install pack, with grid option as V2 was.

If you are running my previous version 2, you can (but backup the existing database!) use an included upgrade SQL patch, and just overlay the V3 files over your V2 installation. I did this on my book site:
http://www.hareslade.com/zc/index.php?main_page=index&cPath=3

What I need from people is, test V3 out, p.m me if there are any sql hiccups or identifiable bugs, then i can issue the proper V3 download fileset in a while.

V3 has been tested by me, but I need to do other things just now, and if anyone can get it together to convert the 'extra' defines needed for book display (firstly cart, secondly admin pages) into ANY other languages ...I would really appreciate that! Dreamweaver is best for that process on those php files..

There is a sub-folder in the pack that has the 'english' defines extra set needed for book, these need going through and properly converting to equivalent other languages.

Do give me converted 'book' defines, ideally matching one of the 'official' 1.3.7 language packs languages?

Enjoy... test...be happy...

26 Jun 2007, 12:42 AM
#231
gxjenkins avatar

gxjenkins

Zen Follower

Join Date:
Apr 2007
Location:
Tampa, Florida
Posts:
180
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi,
I followed the install instructions for v2 but under Product Types I expected to see a new product, but didn't.
I have added a new product before installing this MOD, could it be conflicting?
Thanks.

Gary Jenkins
Your Neighborhood Store
It Ain't Over Until You Quit, So Don't!

26 Jun 2007, 9:36 AM
#232
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

gxjenkins
yes in V2 you should see a new admin product type 'book-product', (i.d is 7) did you apply the sql patch?. Are there tables in the database named '...book...'?

Maybe it needs the database tables inspecting, the sql patch line that inserts book type is

INSERT INTO product_types VALUES (7, 'Product - Book', 'product_book', '1', 'Y', '', now(), now());
 

so inspect the 'product_types' table in phpmyadmin, probably from your host cpanel.

  • it doesn't matter what products you already put in in 'other' product types, a new book product is addable once you have the book product type files installed, with the database sql patch successfully applied.
26 Jun 2007, 7:10 PM
#233
gxjenkins avatar

gxjenkins

Zen Follower

Join Date:
Apr 2007
Location:
Tampa, Florida
Posts:
180
Plugin Contributions:
0

Re: Product Type Book (by moku)

I made some progress last night. I found under 'Admin', 'Extras' some things for Books, so something did happen. I still didn't have a Product Type for books.
I uploaded the files in the MOD for "EXTENDED_BOOK_MAIN_FILES", and in the catalog directory there was a folder "RUN_THIS_SQLPATCH_FOR_DATABASE". After running this patch the new Product Type was there.
I haven't figured out what the "Book DD2-DD" is for, but sofar everything seems to be working fine.
BTW, is anyone running the BETA? Does it fix any issues, or provide more than what is in V2? Just wondering.

Gary Jenkins
Your Neighborhood Store
It Ain't Over Until You Quit, So Don't!

26 Jun 2007, 8:16 PM
#234
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

book dd2 (in extras) is one of the extra 'multiple value' fields, if you switch it on in admin | product type books | edit layout, it sticks an extra book field in your 'collect info' book page in admin, and on book cart display.

The six dd's fields can have more than one value selected .. the authors is an example (it's dd1 actually), you can link any number of authors to a single book.

There are many other 'unused' fields lurking as well there.. you don't have to use them unless you need them. The simpler ones are just single value fields, while the dd's can provide multiple values per book, chosen from your entered values in the corresponding 'extras'.

And before anyone asks.. blame moku for having to stick authors in admin 'extras' separately .. but he had very good reason to do it that way, it enables the book display of authors being immediately searchable for other books by that author, and this method a neater way of ensuring authors don't get repeated, with entering say one called 'D.J.Smith' and one called 'D.Smith' (and one Dave Smith) all at different times, once you forget what you called him first time..

=====
BETA 3

Well give the Beta 3 a chance.. its only been up a few days. I'm encouraging people to use V3 because I won't be updating V2 when a new zencart version comes out. Although V2 is quite ok, V3 is going to be the ongoing one.

I can't support updating V2 above 1.3.7, it means double work.. V3 code is handling potential multiple languages, the database has extra 'language i.d fields' not present in V2, the php coding is more complex.

V3 is the multi-language version, which the book product 'should' have been from day 1... so someone should use it and tell me anything needs fixing..

Most people will probably use V3 in single language anyway.. and you can upgrade from V2 to V3 using the upgrade section in the V3 download.

The main difference you notice in V3 versus v2, is that in single language you get a language flag by a lot of the book fields (even though its running single language), and the books admin page for products is laid out differently because it may need to display sets of data 'per language' when running multiple languages.

26 Jun 2007, 8:33 PM
#235
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

btw
just to expand on the six 'dd' multiple choice fields,

For each book, imagine that values stored in that book's database field for 'authors' is a list separated by commas,

each 'author name' in that list is one of those selected in the book admin, from the 'multiple selection' dropdown box' for authors,

the master dropdown box list itself is created directly from the 'dd' entries (e.g authors) that you already loaded into in admin | extras.

Once you use it, it becomes obvious what it does...

27 Jun 2007, 4:35 AM
#236
gxjenkins avatar

gxjenkins

Zen Follower

Join Date:
Apr 2007
Location:
Tampa, Florida
Posts:
180
Plugin Contributions:
0

Re: Product Type Book (by moku)

Thanks for the explanation. I added a few books last night, and I like it. I'm glad I only had 3 books listed before adding this MOD. I will get to V3 after a do a backup. I'm trying to sell one of my three stores, and I need to be ready to move the stock over if it sells. My poor little Thrift Shop is going to go from 90 items to about 1000. I hope the seems don't break.
Thanks for your help.

Gary Jenkins
Your Neighborhood Store
It Ain't Over Until You Quit, So Don't!

28 Jun 2007, 9:43 AM
#237
raunharman avatar

raunharman

Zen Follower

Join Date:
Dec 2005
Posts:
165
Plugin Contributions:
0

Re: Product Type Book (by moku)

I need to display the Book Title in a bigger font than other details. How do I do it.

Also if I donot write anything in the subtitles, can I stop the titel getting repeated in product display.

http://www.raunharman.com
http://www.raunharman.net
Website Development, E-Book Solutions & Handicraft Exports

29 Jun 2007, 6:11 PM
#238
amilcar avatar

amilcar

New Zenner

Join Date:
Jun 2007
Location:
37°N
Posts:
3
Plugin Contributions:
0

Re: Product Type Book (by moku)

hareslade
Just great job on V3 of PTB especially its support for multi languages! However, some little problems :
Authors and Publishers fields do not register any input in DB except for the images (V2 had no problems with that)
I upgraded from V2 to V3 and applied all the patches but errors occur when applying the last part of patch file ADMIN_PATCH_SQL_EXTENDED_BOOK_TYPE_V3
specifically the last section about filters :

#-- -------
#-- Filters
#-- -------

#jph added the other two blank fields to clear a 1.3.5 php error etc

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

#-----------< END >--------------------------------------------------

The error produced by the admin sql patch is:

1062 Duplicate entry 'book_genre_id' for key 1
in:
[INSERT INTO zen_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');]

Other than that other stuff works fine so far. I'm still testing this beta V3 and I'll share the experience with you all.

30 Jun 2007, 12:26 PM
#239
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi Amilcar

Thanks for trying V3 upgrade, the 'Duplicate entry 'book_genre_id' etc probably indicates you applied the full V3 sql patch for a new V3 install, rather than an upgrade patch?

You're supposed to use the update sql patch if you already have V2 book installed, maybe I didn't make that clear

Restore your backup V2 book database before your upgrade attempt, (you may now have the V3 actual books fileset uploaded, but thats ok)

now apply the update sql 'sql_update_V2_TO_V3LANGS.txt' in folder 3_UPGRADE_EXISTING_BOOK_V2_TO_V3_LANGS

This is a cut-down sql patch, that only updates some book table fields (and keys) in the database,

The full V3 sql that you appear to have used will indeed probably only half complete, and the missing authors etc are probably due to that. Cross fingers..

30 Jun 2007, 12:46 PM
#240
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

raunharman:

I need to display the Book Title in a bigger font than other details. How do I do it.

Also if I donot write anything in the subtitles, can I stop the titel getting repeated in product display.

raunharman, yes the subtitle label display should not appear if you leave the book subtitle empty

and the book title main display text size/appearance is controlled by page html

<h1 id="productName" class="productGeneral"..... 

So... you can change the 'h1' (heading 1) css setting in the zencart stylesheet file,

Currently stylesheet.css standard zencart has

h1 {
	font-size: 1.5em;
	color: #9a9a9a;
	} 

You can increase the em value for size, but this will change ALL h1 text on your cart

Or you could use the id, insert this into the css file, it should only of course change the product name size
..

#productName {
	font-size: 3em;
	color: #9a9a9a;
	} 

Suggestions only, you need to read up a little on css styles, if you do these things.

I could have changed the class or id in the html page template, to relate to books only, e.g 'productBook', but I didn't.