Re: 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/downloa...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..
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!
Re: Product Type Book (by moku)
Quote:
Originally Posted by
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
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
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
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
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
Code:
<?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.
Re: Product Type Book (by moku)
Quote:
Originally Posted by
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
Code:
<?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.
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:
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/downloa...menting_v1.zip
If it still faults please p.m me with line number.. I didn't actually use the file on a site..
Re: Product Type Book (by moku)
Tried it, no luck. I PM'd you. Thanks!