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 381 to 400 of 647
24 Mar 2008, 1:10 AM
#381
hareslade avatar

hareslade

Totally Zenned

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

Product Type Book (by moku)

Hi Mike
Sorry you're having probs..
I can have a look at it later on, didn't notice that on V4 issue1, thats still at
http://www.jphuk.co.uk/zc125/download/zencart1_3_8a_addons/ML_ZC1_3_8_EXTENDED_BOOK_TYPE_V_4_LANGS_ISS1.zip
youcould compare files..

What might have happened is easypopulate use might have altered something?

Try installing the original database that was just after you added the book types sql patch, when you hadn't used easypopulate.. If you haven't got that, try a new install of zencart 1.3.8 separately and start again, and make sure you get backups at various stages.. trying to trace non existent bugs is painful..

I'm not saying its 'not' a bug, just that I didn't notice it with issue 1, issue2 is hardly changed.

If it is the php coding, its quite difficult to trace as the hidden field values are often passed behind pages as arrays, due to the multi-language setup. You can trace them in the view source 'form' html, of some pages.. author and nickname are the simpler ones as you'll only be in the authors tables.. they are separate from the book product, database entries..

24 Mar 2008, 6:08 AM
#382
chinesebks4children avatar

chinesebks4children

New Zenner

Join Date:
Mar 2008
Posts:
4
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hello Hareslade and Mike,

I am very interested in your discussion regarding ez-populate. We were planning to use that to import all our products (approx. 250) and had been testing it successfully.
Now I have installed the book product type we definitely would like to use that too even if only to change the display from model to ISBN, etc...

However, I've noticed that I can not change the products already setup in zc from Product - General to Product - Book anywhere. That's not too big a deal since there are only a few test items so far.
But my more important question is, I can't see any way that Ez-populate will let me upload a host of books with any setting that indicated that it is Product - Book. There seems to be no field for that in the Ez-populate csv file.

(I realize that is thread is supposed to be about the book product type and not ez-pop or general zc use, so I really appreciate any help)

Thanks!

24 Mar 2008, 5:54 PM
#383
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

chinesebks4children:

However, I've noticed that I can not change the products already setup in zc from Product - General to Product - Book anywhere. That's not too big a deal since there are only a few test items so far.
But my more important question is, I can't see any way that Ez-populate will let me upload a host of books with any setting that indicated that it is Product - Book. There seems to be no field for that in the Ez-populate csv file.
I managed to change my general products to book products by changing the product_type in the products table from 1 to 7. This is only part of the answer though... as the fields you want to populate for books are stored in the extra tables so you have to fill these in manually.

Regarding easypopulate, as this product type makes use of extra tables there is a significant amount of work to get the right data into the right tables. As a real beginner to all this stuff I am using this as a self training exercise and progress is really slow.

The two files that need to be amended as far as I can see are the admin/easypopulate.php file to add the data and admin/includes/functions/general.php which contains a function that deletes products 'simply' ensure the extra tables are added to/deleted from correctly with links via the correct ids for each of the tables.
Another important change is to either allow product_type to be uploaded/downloaded or (as I did for now - but not recommended) hard code the product-type in the easypopulate.php to always update product_type 7 (or whatever you are using for books.

So far I have successfully uploaded, downloaded, added and deleted the products table combined with the fields in product_book_extra table and changed the version of easypopulate I have so that it automatically removes the category if no further products exist within it.

If I get a measure of success with this I will post my mods - it may take a while though!!

Mike

24 Mar 2008, 5:57 PM
#384
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hareslade,
Thanks, I will take a look at files in the link you provided and see if there are any problems...

Mike

24 Mar 2008, 6:56 PM
#385
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hareslade,
I did the comparison thanks. I am not sure how, but I appeared to have a pre-corrected version of the book_authors.php (at the top of both Issue 1 and 2 there is the word 'corrected' - my version did not have this also:

'book_authors_name' => $book_authors_name[$i],
'book_authors_nickname' => $book_authors_nickname[$i],

in the corrected version is:

'book_authors_name' => $book_authors_name_array[$i],
'book_authors_nickname' => $book_authors_nickname_array[$i],

Making this change has fixed it.

Thanks for your help.

Mike

25 Mar 2008, 2:35 PM
#386
hdonald avatar

hdonald

New Zenner

Join Date:
Oct 2006
Posts:
32
Plugin Contributions:
0

Re: Product Type Book (by moku)

This may have been covered elsewhere in this thread, but I haven't been able to find the answer so here goes.

I have a fresh copy 1.3.8a, no changes made, installed on my test server. I installed the Book Main Files and sql, followed the directions, etc. When trying to add a new product with a product type Book I am getting an error

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in ***\admin\includes\modules\product_book\collect_info.php on line **1766

**Any input would be helpful. Thanks!

Heather

25 Mar 2008, 3:19 PM
#387
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)

Mike.. yes I remember vaguely now, the arrays were missing for multilanguages author and nickname.. so you are correct..


hdonald, your server is extra-awake, its reading some poor 'commenting out' structure (which it was intended to ignore) as a php code. Most servers don't do that..

You can remove unused lines 1758 to 1773 in that file,
or just remove 1765-7, i.e this offending bit

<?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . 
zen_draw_pull_down_menu_multiple('book_dd1_id' . $i . '[]'', $book_dd1_array[$i], $book_dd1_default_array[$i],  'multiple="multiple"',20)
?>

Or you could just separate above, the first ? from the < and 'php', and the last ? from the >, so the server doesn't see php start and finish codes.

25 Mar 2008, 3:35 PM
#388
hdonald avatar

hdonald

New Zenner

Join Date:
Oct 2006
Posts:
32
Plugin Contributions:
0

Re: Product Type Book (by moku)

hareslade:

hdonald, your server is extra-awake, its reading some poor 'commenting out' structure (which it was intended to ignore) as a php code. Most servers don't do that..

You can remove unused lines 1758 to 1773 in that file,
or just remove 1765-7, i.e this offending bit

<?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_pull_down_menu_multiple('book_dd1_id' . $i . '[]'', $book_dd1_array[$i], $book_dd1_default_array[$i], 'multiple="multiple"',20) ?>


I tried your suggestions, but I am still getting the same error, different line numbers with each one, but still an error.  I don't know if I am doing something wrong, I'm not too sure of php, I probably know enough to get myself into real trouble here.  :smile:
25 Mar 2008, 4:40 PM
#389
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 hdonald
there's more than 1 comment block I saw would need removing..

try this 'comment blocks removed' collect_info file to replace the one in admin\includes\modules\product_book\collect_info.php
http://www.jphuk.co.uk/zc125/downloads/fixes/collect_info_bv2_no_commenting_v1.zip
If it still faults please p.m me with line number.. I didn't actually use the file on a site..

25 Mar 2008, 5:13 PM
#390
hdonald avatar

hdonald

New Zenner

Join Date:
Oct 2006
Posts:
32
Plugin Contributions:
0

Re: Product Type Book (by moku)

Tried it, no luck. I PM'd you. Thanks!

26 Mar 2008, 12:54 AM
#391
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hareslade,

I've just discovered that I have an error when I try to do a ISBN search...
When I type in a textual ISBN it comes up with:

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 'where book_isbn = 123456654' at line 3
in:
[select special from where book_isbn = 123456654]

I've probably messed up something but not sure where... do you know where this code would be coming from?

btw I've now got Authors and Genres automatically updating from an easypopulate upload. I've still got some work to do to get 'redundant' authors removed when products are deleted, and I am only pupulating the minimum fields to get the authors and genre searches working (so I don't allow for genre description or author url for example) but that would be quite easy to include... if required.

Mike

26 Mar 2008, 10:22 AM
#392
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 Mike,
I'll p.m you, the ISBN search is too complex to comment on here!

27 Mar 2008, 4:22 PM
#393
chinesebks4children avatar

chinesebks4children

New Zenner

Join Date:
Mar 2008
Posts:
4
Plugin Contributions:
0

Re: Product Type Book (by moku)

Mike and Hareslade,

I've mostly got what I want working and I wanted to thank you for your help.
Mike, if you get more of EasyPopulate working I'd like to know about that if you have a moment to pm me...

thanks again!

27 Mar 2008, 11:03 PM
#394
zcusr avatar

zcusr

New Zenner

Join Date:
Mar 2008
Posts:
1
Plugin Contributions:
0

Re: Product Type Book (by moku)

...so I had an error of duplicate entry many times, but everything seems to be just fine, that's weird... perhaps information on checking your product type book installation would be useful...

anyway I was wondering has easy populate tab delimited file usage to bulk upload book listings been discussed?
I get that the easy populate mandatory "model" attribute is supposed to be used for ISBNs, but what about other book-specific info, something tells me that I should name the columns like the corresponding tables/rows or something in SQL, but perhaps that has already been discussed...

31 Mar 2008, 5:44 AM
#395
detourned avatar

detourned

New Zenner

Join Date:
Mar 2008
Posts:
2
Plugin Contributions:
0

Re: Product Type Book (by moku)

i was wondering if it was possible to have more than one author appear on two different lines.

what i'm hoping to do is this:

many of the books i'll be listing are works in translation. i would like to have the translator's name appear beneath the author's name, & be searchable as well.

or, how would i go about having a 'translator' field function in the same way as the author field?

thanks!

3 Apr 2008, 10:48 PM
#396
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

zcusr:

...so I had an error of duplicate entry many times, but everything seems to be just fine, that's weird... perhaps information on checking your product type book installation would be useful...

anyway I was wondering has easy populate tab delimited file usage to bulk upload book listings been discussed?
I get that the easy populate mandatory "model" attribute is supposed to be used for ISBNs, but what about other book-specific info, something tells me that I should name the columns like the corresponding tables/rows or something in SQL, but perhaps that has already been discussed...
zcusr
There's more to it than just adding the specific fields. The easypopulate.php needs to be modified also to populate the necessary tables. I have been working on this myself and also deleting using product status 9 but I am a busy guy on my day-job so work on it is a little hit-and-miss.

3 Apr 2008, 10:51 PM
#397
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

chinesebks4children:

Mike and Hareslade,

I've mostly got what I want working and I wanted to thank you for your help.
Mike, if you get more of EasyPopulate working I'd like to know about that if you have a moment to pm me...

thanks again!
I've just PM'd you on this topic - check your mail :)

3 Apr 2008, 11:05 PM
#398
mikefarrant avatar

mikefarrant

New Zenner

Join Date:
Jan 2008
Posts:
9
Plugin Contributions:
0

Re: Product Type Book (by moku)

If you promise not to buy anything... (I have no books for you - but can and will take the money!!) Feel free to visit my book store... it's not too shabby to view now - although I have some way to go before it opens officially - The finished store will have around 500 products - books, cds and dvds

Special thanks to Hareslade :smartalec: for his help

I welcome any constructive comments...

http://www.branchchristianbooks.co.uk/shop/index.php

Thanks,

Mike

17 Apr 2008, 1:18 PM
#399
focus360 avatar

focus360

New Zenner

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

Re: Product Type Book (by moku)

I have just installed this Mod. And had a very good search of this thread and others.

Currently the mod shows the ISBN and the author on the product listing page.

Is there any way I can show other fields on the product listing page?

I was hoping to display three or four other fields e.g. format, subject, size.

AND THANK YOU THIS IS A GREAT MOD! :smile:

23 Apr 2008, 5:27 PM
#400
aenea avatar

aenea

New Zenner

Join Date:
Apr 2008
Posts:
11
Plugin Contributions:
0

Re: Product Type Book (by moku)

Hi! I'm new here and am having fun implementing this software for an online bookstore we hope to set up.

I have two questions related to the search facility:

  1. How can I make the keyword search search the additional book fields (author, subject, etc.) as well as the title and description? I paid a visit to MikeFarrant's online store and he appears to have got it to include the subject field in the keyword search, though not the author.

  2. Where do I go to find the code that generates the ouput from the keyword search? I'd like to add some text to make it more obvious that clicking on the book's image will take the user to further details about the book.