-
Creating an add-on "product type book" for ZC 1.5
I am in the middle of creating a new product_type book for ZC 1.5. with the working title "bookx", so from here on "bookx" refers to my yet to be created new product type book. It will be for ZC version 1.5. only I do not intend to adapt it to any lower ZC versions.
To get started I have downloaded the last version of the add-on which this thread was created for (the "moku" product type book, from here on "moku book") and since I didn't understand very well how it worked, I decided to start from scratch. This is the old plugin I looked at:
Quote:
Originally Posted by
sammirah
Do be forwarned it doesn't work too well with 1.5.0 but I have been able to use it seemlessly with 1.3.9h and earlier. 1.5.0 has it's own version of product book but it is seriously lacking. Maybe the developers can take this and figure out what is missing with the new version of zen cart.
http://www.atmospherebooks.com/test/...LANGS_ISS2.zip
Sammirah mentions a product_type book already provided for ZC 1.5. on which one could build, but I have been searching all over and I couldn't find anything.
Furthermore this ZC wiki post mentions a product_type book, but I couldn't find anything about that either. Seeing that the documentation says it's for ZC 1.2 it would probably too old anyway.
Even though I do not plan to build onto "moku book", I may try to provide an import function, so that data already entered for "moku book" doesn't have to be completely re-entered for use with "bookx". That way orders and other references to existing products wouldn't have to change. That's the theory, I don't know how well it will work :-)
However, since I do not currently use "moku book", it would be great if someone interested in this conversion feature could provide some Mysql data containing the tables added by "moku book". It really just needs one or two actual entries per table, so that I can see the table structure and the kind of data stored there.
Here's what I am planning for "bookx":
the "product model" field will be used for ISBN / EAN
Additional data fields provided by "bookx":
subtitle
no. of pages
printing (color)
binding type
size
volume no. (for series)
publishing date
publisher
imprint / sublabel
series
authors (multiple possible)
genre (multiple possible)
book condition
Of those, the following data items will be managed in a separate table and can be assigned to a product through a drop-down.
They will have the fields listed in (parentheses). "Language_specific" fields can be entered separately for as many languages as are installed in the shop.
printing (language_specific_description, sort_order_for_dropdown)
binding type (language_specific_description, sort_order_for_dropdown)
book condition (language_specific_description, sort_order_for_dropdown)
imprint / sublabel (language_specific_name, sort_order_for_dropdown, sublabel_image_for_shop)
series (language_specific_name, sort_order_for_dropdown, sublabel_image_for_shop)
genre (language_specific_description, sort_order_for_dropdown, genre_image_for_shop)
publisher (language_specific_name, sort_order_for_dropdown, publisher_image_for_shop, language_specific_url, language_specific_description_text)
authors (name, sort_order_for_dropdown, author_image_for_shop, language_specific_url, language_specific_description_text)
In the code of "moku book" I saw a field called "book type", but I don't understand what it is used for. I therefore do not plan to implement a "type" field for the "bookx" add-on. Furthermore, "moku book" uses a good number of "misc" fields and quite some "drop-down" fields, for which I also do not quite see what they are used for. Possibly they have something to do with searching, but whatever they do, there must be a more elegant way to achieve the same result :-)
If someone wants to comment on these extra data fields, please do.
I myself will be using this add-on for a single publisher with an online shop, so a bookstore may have different needs. For example there is no plan for a data field "book language". Let me know if this is needed for someone.
All data items can be set in the admin backend to appear in the product_listing and product_info view.
It would be great if there are volunteers for a (short!) beta-testing stage, so that the add-on has been tested by a few people before it is installed in online shops.
philou
-
Re: New add-on "product type book" for ZC 1.5
Philou, I have been combing the internet for someone working on a book product type module for 1.5 for the past 2 hours. What a strange coincidence that you made this post just a few moments ago. I have a great need for this plugin, and would happily volunteer for some beta testing.
The site I'm building is a wholesale book site, and the primary requirements I need to meet are these:
-To be able to sort books by author (or select the letter that the author begins with & it display everything that matches)
-To be able to import all of the inventory from stone-edge(an inventory management software compatible with zen-cart) so that each field from stone-edge goes into the correct book product type field.
Do you think those two things would be achievable with the module you're working on?
-
Re: New add-on "product type book" for ZC 1.5
Hi nealt900,
the search should be possible as I plan to implement search / filtering by genre / author / publisher etc.
The import should be doable as well, however I would first have to get an idea of how much work is needed to develop this before I can commit to implementing that, as an import from your inventory management add-on is a bit beyond what I would personally for my setup here :)
If you can upload an snippet of SQL somewhere with a table structure and 2-3 lines of data, I will have a look once I get to that part of the job. You can send me a message with an URL for the data.
Let's see how the whole thing progresses.
I am expect development to be a matter of weeks.
-
Re: New add-on "product type book" for ZC 1.5
philou I am working on a bookstore web site for ebook reading and downloads. I will be a beta tester for your plugin.
-
Re: New add-on "product type book" for ZC 1.5
Ok, work has progressed nicely but over the last three weeks I have been diverted to other projects. I hope to have something to test soon :)
-
Re: New add-on "product type book" for ZC 1.5
Hi jkcollect,
do you need to covert existing products into "book type" or will you be entering everything as new products?
if you need them converted, will they be converted from "product type general" or are you using anoethr product type already?
thx,
p.
-
Re: New add-on "product type book" for ZC 1.5
Hi all, I am a publisher and very interested in this thread. Please IM me if you need help or testers. I am using 1.5 Zen Cart and currently working on a new design.
-
Re: New add-on "product type book" for ZC 1.5
Hi D4F,
development has progressed well, but it's lacking some work on the "catalog" side, i.e. filtering for "authors" or some other attributes. The display of product info for the "book" type is still very ugly at present, but that may be the smallest problem, since most users may customize the product info display anyway? It's also missing an instruction manual which covers at least the basics.
Hopefully in February it will be in a state where I could pass it on for some testing.
There is some very basic conversion of "normal" ZC products to the "book" type and back. I don't know if there are other "book" plugins currently in use, for which it would be nice to convert to this new book product type. That may be something for a future version.
-
Re: New add-on "product type book" for ZC 1.5
philou,
I'm a bookseller looking at different cart solutions. If you're near a testing phase I'd love to take a look! If zen cart winds up being our best solution then I'd be happy to help out some too.
-
Re: New add-on "product type book" for ZC 1.5
Hi Booker,
I hope to get back onto this project within the next two weeks – unfortunately (for this project :-) I have been submerged in another project over the past two months...
As I said above, the development on product type "book x" is actually quite advanced, but it needs some pulling together. For someone who is a developer and quite familiar with ZenCart it should be useable soon, for someone who needs to mainly interact with the module through the backend, it still needs more polishing.
I will make a post here as soon as I have something that can be beta tested by those who are currently developing a shop.
Best regards,
p.
-
Re: New add-on "product type book" for ZC 1.5
Hi Philou,
I'm in the same position as Booker and interested as well. I'm not a developer but I have played around a bit with Zen Cart and I might help with localisation (to Dutch) and with testing.
-
Re: New add-on "product type book" for ZC 1.5
The new product type is now working pretty well. I am still testing the installation /removal script and putting together a bit of sample data. I expect to have something to beta test within the next week.
p.
-
Re: New add-on "product type book" for ZC 1.5
I know it sucks to document, but I need to know how to add in new filter variables and filter items that you seem to be working with so any insight you can give on these would be very helpful.
-
Re: New add-on "product type book" for ZC 1.5
I have just submitted a first version of BookX(0.9 beta) for review by the ZC team here. Apparently new add-ons are reviewed every couple of days, so I will post here, if/when it is approved. In the meantime the files are also available on the sourceforge project page for BookX: http://sourceforge.net/p/zencartbookx
This module is already running pretty well on my development system, but surely there will be things to fix before making this a stable release. If you do decide to check out the beta version, just make backups of database and ZC shop files to be safe!
-
Re: New add-on "product type book" for ZC 1.5
A typo in the install script prevents any changes to layout flags in Admin –> Webshop -> Product types -> Bookx -> Edit layout.
It will be fixed in the next update to the beta, but since it really restricts any testing of the plugin, there is an SQL patch you can download right now from sourceforge which will fix it. http://sourceforge.net/p/zencartbookx/files
-
1 Attachment(s)
Re: New add-on "product type book" for ZC 1.5
Hi there. I noticed your first post in November when I was about to try getting moku book working on 1.5. Now that 0.9 has been released and I've had a little bit of time to play with it, here are some of my notes.
Bookx specific stuff in admin's preview_info page is missing. Also the meta tags stuff seems to be a work in progress? There could be some book specific stuff added there too.
The biggest complaint I had was the model number being used as the ISBN. My customer really needed them separate. So I've made all the necessary changes and included a git patch file for your review. It adds a new field to product_bookx_extra, adds the field to the product detail pages in the catalog and admin sides, and decouples the model number from the isbn. They are be independently used/displayed.
I'll keep you informed if there's anything else me or my customer find. If you need to contact me via email please use the address in the patch file.
Thanks.
-
Re: New add-on "product type book" for ZC 1.5
Hi Noobish,
thanks for the suggestions. You are correct the Admin "preview_info" does not display the bookx specific fields yet, that will be resolved. So will be the meta tags.
Can you tell us a bit more about the model number issue, since I am trying to figure out if this should be something to be incorporated in the plugin or if this is too specific to your setup. The reason I used the model no. as ISBN is that it is in fact the "model no." of a book. The ZC model no. is used in other sections of the shop, so I thought this was the smartest way to do it.
I am guessing that your client has some kind of internal product id they use to identify a book? If this is the case, would it not be a more useable approach for a wide range of BookX users to keep the ISBN in the "model no." field and offer your additional field as some kind of "internal id"?
Thanks,
p.
-
Re: New add-on "product type book" for ZC 1.5
Yes, they use a different internal ID number. As do many shops. Amazon, for example, has an internal model number for their inventory, etc. They also list 2 ISBN numbers, both a 10 digit and EAN-13 digit. They may even print a separate UPC number, I'm not sure. Point is, there's lots of numbers to assign to the model number field that are independent of the ISBN. The ISBN number is useless in the model number field in my customer's case, since the model number is printed on packing slips, receipts, etc. That's what they need to pull inventory with. The ISBN is there mainly for search engines to index.
I would think that the widest usability case would be to decouple the fields, and allow the user to type whatever they want in the model number field. If they want it to be the ISBN, they can put it in there, as well as in the separate ISBN field, or leave the ISBN blank and hidden. It can be up to them. But this way they have the choice.
-
Re: New add-on "product type book" for ZC 1.5
Ok, an extra "custom field" can't hurt in any case. If such a field exists, then every admin can use it as they want. Admins like yourself could indeed use the custom field to hold the ISBN and use the model field for something else, if they like.
The big question for me is now, what the default behavior should be. The "model no." is used in the order class, the shopping cart class, in the default search and some other places as a superficial search in the code just revealed. Staying in the ZenCart logic and looking at it from a customer perspective, I still feel the use of "model no." in ZC matches the role of the ISBN. If customers are looking for or identifying books by anything else than the title, wouldn't they most likely use the ISBN and not some internal number of amazon or whomever? ISBN10 and ISBN13 can be derived from each other, so that should not be a factor.
It is my impression that by placing the ISBN in a different field, we are going against the internal ZC logic, which doesn't seem like a good idea.
Maybe some other (prospective) users of the BookX plugin want to comment on this?
-
Re: New add-on "product type book" for ZC 1.5
I haven't had the time yet to take a look at the plugin, unfortunately. But about the ISBN:
- not all books have an ISBN!
- ISBN's may be printed wrong in the book
- some books have different cover-editions (but the same ISBN's)
So I think one needs an internal product or model number and a separate ISBN-field (useful extras: the handling of hyphens and a check on the number).
-
Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
hboswijk
I haven't had the time yet to take a look at the plugin, unfortunately. But about the ISBN:
- not all books have an ISBN!
- ISBN's may be printed wrong in the book
- some books have different cover-editions (but the same ISBN's)
So I think one needs an internal product or model number and a separate ISBN-field (useful extras: the handling of hyphens and a check on the number).
Yes, I think the need for an additional field for an internal ID is easy to see and something like this will be added for sure. Books that don't have an ISBN could use the ISBN field or separate field for ID. You can also decide to just leave the ISBN field empty and fill in only the book titles if that works for you. Books with different covers could simply have the same ISBN and different cover images, so no problem there either as far as I can see.
ISBN number validation will surely be implemented.
-
Re: New add-on "product type book" for ZC 1.5
Actually, the "model no" is not used in all that many places in the ZC system and I now discover that some BookX specific info needs to be injected anyway in the shopping cart (e.g. "subtitle" of book). Therefore, an extra ISBN field separate from "model no." looks like it could work ok.
-
Re: New add-on "product type book" for ZC 1.5
Cool. I wasn't saying that my customer uses Amazon's internal IDs. It was just an example of what another online store does with products that have ISBNs. They need to use their own internal id number for inventory. The model number field is treated just like the products_id field in osCommerce. It really is an ID field rather than a model number. They just couldn't call it id because they implemented an auto-increment field with that name for database rules.
-
Re: New add-on "product type book" for ZC 1.5
So who's using this plugin? Remember, it's Feedbackware ;)
Tell us what kind of shop you are using it for e.g. publisher? Bookseller? Multi-language?, if you only sell books or other products as well. That helps me to get an idea what other user scenarios to keep in mind while developing this plugin.
I am close to relasing another version of the plugin, which will still be called BETA, but I find it's in fact rather stable. If anybody discovered bugs while using it, now is a good time to let me know.
Apart from ironing out some minor glitches, the new version will most notably allow searching for BookX attributes like authors, publishers, series, etc. via the ZC "search" sidebox. Furthermore it adds a separate listing of BookX attributes, like all authors, all series, etc.
Cheerio,
p.
-
1 Attachment(s)
Re: New add-on "product type book" for ZC 1.5
OK, now I have taken some time to look at the plugin. It looks very nice already from a booksellers point of view. I can't judge the technical side.
Here are my observations:
1. I tried to add a dutch translation to the plugin, simply by copying the language files to a folder 'dutch' and translating some of the strings. But that does not function properly. On the storefront the only book I see is the one I added manually. The imported titles from the sample data file don't show up. On the admin side adding or editing a book in the dutch interface results in a blank page. In German and English it works OK. So obviously installing a translation needs something extra.
2. Importing the sample book data resulted in an error (this was before I installed a german language pack for Zencart), and then some of the fields were imported (title, description), others were not (authors, publishers were replaced by authors and publishers I had already entered). But maybe this was due to my messing around with the dutch translation. I will try a new clean install of it all to check this out.
3. The order of the custom fields is now: Attachment 12498 (Is this image visible?)
In text: Subtitle, Publishing date, Volume no., No. of pages, Size, Publisher, Series, Author(s), Binding.
A more logical order would be (certainly for me as a former librarian :smile:), including not yet available (nya) fields: Subtitle, Author(s), Edition (nya), Publisher, Publishing date, No. of pages, Size, Series, Volume no., Annotation (nya, could go in Description), ISBN (nya?), Keywords (nya).
4. The Publishing date field now requires a real date, but just a year will do fine, as day and month are normally unknown.
About the front:
5. I created some author types (main author, editor, illustrator, translator). In the product listing they don't show up in the right sorting order, and anyway just the main author would be enough there. (in Opera that is, in IE9 only the main author is shown ?)
6. In the single product view, part of the information is shown twice: once below the title, and once more under the description (publisher and authors).
7. The Book filters box in the sidebar shows information from the box above it, under the header, above the filters.
See: www.h b p r o j e c t e n.nl/hbwinkel
That's it for now.
-
Re: New add-on "product type book" for ZC 1.5
Hi hboswijk,
thanks for your feedback.
Here some comments:
Quote:
Originally Posted by
hboswijk
1. I tried to add a dutch translation to the plugin, simply by copying the language files to a folder 'dutch' and translating some of the strings. But that does not function properly. On the storefront the only book I see is the one I added manually. The imported titles from the sample data file don't show up. On the admin side adding or editing a book in the dutch interface results in a blank page. In German and English it works OK. So obviously installing a translation needs something extra.
I tried to duplicate your problem, but everything works here. I duplicated the "english" folders in "ADMIN/includes/languages/" and "CATALOG/inlcudes/languages/" and named the folders "dutch". I then created a new language called "Nederlands", folder name "dutch", language code "nl". Everything seems to wortk fine, my products show up and a new product with info in the "dutch" fields displays that info. I have changed some language files inside the folder "dutch" (BookX files) and if the frontend also is set to use "dutch" then it shows the modified labels. Maybe you can try the same approach and duplicate an existing folder, but surely there must be a dutch translation for ZenCart already? You probably don't want to translate the entire shop.
Quote:
Originally Posted by
hboswijk
2. Importing the sample book data resulted in an error (this was before I installed a german language pack for Zencart), and then some of the fields were imported (title, description), others were not (authors, publishers were replaced by authors and publishers I had already entered). But maybe this was due to my messing around with the dutch translation. I will try a new clean install of it all to check this out.
I will look into that again, the sample data import has not received enough attention from me, since it was just a way to let me (and you!) test the installs without having to create books, authors, publishers etc. every time.
Quote:
Originally Posted by
hboswijk
3. The order of the custom fields is now:
Attachment 12498 (Is this image visible?)
In text: Subtitle, Publishing date, Volume no., No. of pages, Size, Publisher, Series, Author(s), Binding.
A more logical order would be (certainly for me as a former librarian :smile:), including not yet available (nya) fields: Subtitle, Author(s), Edition (nya), Publisher, Publishing date, No. of pages, Size, Series, Volume no., Annotation (nya, could go in Description), ISBN (nya?), Keywords (nya).
It will probably be difficult to find a solution that fits everybody. I wonder if it is critical enough to add a sort order mechanism or if that just makes everything too complicated. If you know just a little bit of HTML, then you can reorder the fields inside the "collect_info.php" file in the ADMIN. I could mark the start and end of a field entry with <!-- comments -->, so that it is clear what to move around?
Arguably, the Series and Volume No. have more to do with the Title and Subtitle of the book and should be close together?
ISBN is implemented in the upcoming release.
Could Keywords go into the product specific META TAG keywords? They would make sense there and it should be possible to add a way to include them in BookX searches or cross-references. What do you think about that?
I wouldn't have use for an "Edition" field, so in your scenario, does this have to be a free entry field for administrator text or could you also define a list of options to choose via pop-up? The way it is now, pop-ups e.g. for genres or publishers only show up on the "collect_info" page, when there are genres or publishers defined for BookX. This way, if a shop is not using them, they don't get in the way. If that were the same for "Edition" I could very well see adding this field.
Quote:
Originally Posted by
hboswijk
4. The Publishing date field now requires a real date, but just a year will do fine, as day and month are normally unknown.
Good point. I will check out the Calendar plugin used by ZC, to see if a year & month only selection is working or if it needs to be entered by hand. Anyway, this should be working as you suggest.
Quote:
Originally Posted by
hboswijk
About the front:
5. I created some author types (main author, editor, illustrator, translator). In the product listing they don't show up in the right sorting order, and anyway just the main author would be enough there. (in Opera that is, in IE9 only the main author is shown ?)
I will check to make sure sorting order is respected in the product listing view. To only show one and not the others will be tricky.
I will need to do something similar myself with "Series" and I am using custom code to only display sort orders smaller than say 1000. We could do something like that for product listing, or will it be confusing?
Quote:
Originally Posted by
hboswijk
6. In the single product view, part of the information is shown twice: once below the title, and once more under the description (publisher and authors).
I think I know what you mean. The Product Info page was still very crude in the first BETA. I have polished it a bit, but it's not yet brilliant. Eventually it needs to look nice to go online, so we should have something that is accepatble for most users.
Quote:
Originally Posted by
hboswijk
7. The Book filters box in the sidebar shows information from the box above it, under the header, above the filters.
See:
www.hbprojecten.nl/hbwinkel
Since I took some time to respond to your post :-%, you seem to have changed your shop settings. In any case I don't see the problem you describe. However I remember that I did have a similar problem here a while ago (after release of first BETA) and I fixed it, so maybe that also resolves your issue.
I hope to get back onto this job quickly, but my attention has been diverted by another project, which puts some bread on the table ;-)
Best,
philou
-
no way to proceed to the update via admin>>tools
Hi, you,
I used the beta 0.9 and I now wanted to correct with the last release 0.9.1 but there is no way to proceed to the update via admin>>tools.
is there any one who tried the same thing, and what's the come up ?
please help !
-
Re: no way to proceed to the update via admin>>tools
Hi habib_bou,
you discovered a bug in the installation script. It looks like the update script runs, but "forgets" to update the version of BookX, so it says that the update failed.
Anyway, I have uploaded a fixed version at the sourceforge site: https://sourceforge.net/projects/zencartbookx/files/
The only file that has changed is ADMIN/includes/init_includes/init_product_type_bookx.php so you can also just update that file in your shop and then it should run (at least it does here).
Can you please confirm that this works for you, so I can update it here on the Zen cart site as well. The submission process here is a bit longer, so I'd like to know that it works first...
Greetings,
p.
-
Re: no way to proceed to the update via admin>>tools
Hi Philou,
Thank you for the feedback; I'll try it and keep you advised of all the process.
I'll make the sandbox for you and for all for this ad-on ( for the benefit of all the zenner community ) untill we come up with a hard rock script ( cause I think there are few other things that I 'd like to see fixed - I'll talk to you about in my next post)
Thanks again
H.
-
Re: no way to proceed to the update via admin>>tools
I tried it and here's what I get ( same as previous try ): "WARNING: An Error occurred, please refresh the page and try again."
Another thing;
The product description shows in list but not in detail page.
It a little bit messy, philou.
If you don't find the bug, it could be caused by me, due to the integration of several other plugins.
I like your ad-on , it's pretty pro to show all details about a book; but I'am wondering about those few interferences with other plugins that could make the whole thing instable.
Thank you for all the efforts your putting in it.
-
Re: no way to proceed to the update via admin>>tools
Another thing:
The title and the subtitle of the book don't show anymore in the detail product page !!!
see what I get:
http://5000ebooks.com/wiseme/index.p...n#.UdNkJ0e4KjY
-
Re: no way to proceed to the update via admin>>tools
I notice also that your putting the price almost hidden ( small character and in the bottom ); is it on purpose ? could you make it on the top before the description and with Larger font ( like in zencart basic template ? ) , this is not a big deal but for an online shop, I think the price is quite important
-
Re: no way to proceed to the update via admin>>tools
Hi Habib,
I have tried what I could think of, but I can't reproduce any errors here. Can you find out more about the error? Please look in your "cache" directory for any DEBUG logs which will tell us more about the error than what is shown in the shop. If no DEBUG logs are there, make sure the "cache" directory is wirtable.
Quote:
Originally Posted by
habib_bou
I tried it and here's what I get ( same as previous try ): "WARNING: An Error occurred, please refresh the page and try again."
Another thing;
The product description shows in list but not in detail page.
It a little bit messy, philou.
If you don't find the bug, it could be caused by me, due to the integration of several other plugins.
I like your ad-on , it's pretty pro to show all details about a book; but I'am wondering about those few interferences with other plugins that could make the whole thing instable.
Thank you for all the efforts your putting in it.
Hm, yes you are right, but don't worry it will be there in the next version which I may release rather soon.
It also moves the price up a bit higher on the page. The size of the price can then be styled with CSS so you can make it look how you want.
Quote:
Originally Posted by
habib_bou
Quote:
Originally Posted by
habib_bou
I notice also that your putting the price almost hidden ( small character and in the bottom ); is it on purpose ? could you make it on the top before the description and with Larger font ( like in zencart basic template ? ) , this is not a big deal but for an online shop, I think the price is quite important
-
Re: no way to proceed to the update via admin>>tools
thank u philou.
looking forwards to the next release
-
Re: no way to proceed to the update via admin>>tools
Hi, I'm trying ZC to see if it can replace the current e-commerce system my organisation is using, and this plugin is exactly what I have been looking for to fill the requirements of our publications dept. - but I was wondering:
the text description field is not visible in the procucts detail page, and we desperately need that. Is that
intentional? If it could be added to any new version that would be fantastic.
I would love an extra description field as well :D
/Magda
-
Re: no way to proceed to the update via admin>>tools
Hi Magda,
the description field on the product info page was somehow lost on the last update, but it is supposed to be there and it will return in the next release. I have left the product info page beautification for last, since I wanted to get the underlying framework to be fairly final first. Expect a new release in the next weeks.
An extra description field would not be too difficult to add, but can you expand on what it would be used for? I try to keep the functionality as universal as possible, so I want to be sure it makes sense for most people before adding it for everybody.
-
Re: no way to proceed to the update via admin>>tools
Excellent news, thank you so much! We would ideally like to separate the more general book description info from a "Detailed Contents" field (where you can list chapter headings, or even embed your Scribd code to display publication in full text - for example see http://books.sipri.org/product_info?c_product_id=463).
By the way, I can't seem to find the "Products URL" field either on this page?
/Magda
Quote:
Originally Posted by
philou
Hi Magda,
the description field on the product info page was somehow lost on the last update, but it is supposed to be there and it will return in the next release. I have left the product info page beautification for last, since I wanted to get the underlying framework to be fairly final first. Expect a new release in the next weeks.
An extra description field would not be too difficult to add, but can you expand on what it would be used for? I try to keep the functionality as universal as possible, so I want to be sure it makes sense for most people before adding it for everybody.
-
Re: no way to proceed to the update via admin>>tools
Hi Magda,
I am wondering if your extra description field wouldn't be better accomplished by finding a ZC add-on which adds an extra field to products. There is for example this: http://www.zen-cart.com/downloads.php?do=file&id=926
I think it should not be very difficult to combine this with the bookx admin interface since the collect_info.php of bookx also loads any PHP files in the directory admin/includes/modules/product_bookx which begin with "collect_info". I can help you with this if you decide to go this way.
In fact I am considering using the "extra fields" plugin for my own bookx online shop, since it includes PDF and Flash previews, so possibly I can post a full solution to combining this plugin with bookx.
When you write that you can't see the "product url" do you mean the "manufacturer url" which is entered on the admin "collect_info" page? It shows a field for this for a bookx type product in admin "collect_info", but it's true that it is currently not saving it nor is it showing up on the "tpl_product_bookx_info_display.php" page. I will fix that. Are we speaking about the same thing here?
I hope to wrap up the next release over the weekend, so if you have any comments let me know asap :)
Best,
p.
-
Version 0.9.2 beta released
Hi,
new version 0.9.2 is available for download on Sourcefoge: https://sourceforge.net/projects/zencartbookx/files
Please leave a quick word here if its working for you, so I can submit it to this site as well.
Best,
p.
-
Re: Version 0.9.2 beta released
Good show. I'm waiting for some feedback from users before jumping in. Keep up the energy guys.
-
Re: Version 0.9.2 beta released
Hi, a long over due response from my side, but other work got in the way.
I just installed the "new" beta version and and it looks and works great from what I can see, very nice. This is enough for us
to get going I think, the text field is visible again and the link "For more information, please visit this product's webpage" also works the way it should!
Presentation also much improved - thanks a lot for creating this, we can now move the the implementation stage of our Zen cart project!
Cheers,
Magda
-
Re: Version 0.9.2 beta released
Hi Magda,
nice to hear that, I have unfortunately also been kept away from this project recently!
Were you the one who requested "keywords" and then I suggested solving this via META tag keywords? And did your combination with the ZC add-on extra field work out?
Thanks for briefly sharing what works for you, so others can follow the same path.
Regards,
p.
-
Re: Version 0.9.2 beta released
Hello,
Thanks for the module.
I have a question about the convert existing products, I have tried to convert a product type music to product type book but after I select the product and click confirm nothing happens, should something appear on the screen to say it has completed? The product does not change?
Thanks,
Breda
-
Re: Version 0.9.2 beta released
Hi Breda,
there is no feedback und you seem to be right, that conversion of music type to bookx type is not working.
I will check that in the next days and post an update here.
p.
-
Re: no way to proceed to the update via admin>>tools
Hi Breda,
fortunately there seems to be a simple solution to fix this:
When you are trying to convert certain products to product type BookX, you first choose the product type via a popup control. Let's say you choose "Music" at this stage. If you then pick the option where you choose from a list of products of type "Music" the page reloads and you get a multiple-selction field where you can pick a product. Now here's the bug: when the page reloads between these two steps, the popup where you choose the type to convert from resets back to "Product - General". That is why your product is not converted. If you reselect e.g. "Music" in our example, then your product should be converted properly.
This is marked to be fixed in the next release.
Regards,
p.
-
Re: no way to proceed to the update via admin>>tools
Thanks P.
Can you help with another question, when I add the standard Zen cart attributes, in this case for Colour Options, they display fine on the page but when I choose a colour and add to cart I get an error message.
I looked at the log debug files and it says:
[05-Nov-2013 12:31:13] PHP Warning: include_once(DIR_FS_CATALOG_LANGUAGESenglish/product_bookx_info.php): failed to open stream: No such file or directory in /hsphere/local/home/garrettmallon/garrettmallon.com/upgrade/includes/classes/observers/class.bookx_observers.php on line 554
[05-Nov-2013 12:31:13] PHP Warning: include_once(): Failed opening 'DIR_FS_CATALOG_LANGUAGESenglish/product_bookx_info.php' for inclusion (include_path='.:/hsphere/shared/apache/libexec/php5ext/php/') in /hsphere/local/home/garrettmallon/garrettmallon.com/upgrade/includes/classes/observers/class.bookx_observers.php on line 554
I have checked and the files mentioned above are on the server in correct folders but I noticed that this path seems to be missing a forward slash?
PHP Warning: include_once(DIR_FS_CATALOG_LANGUAGESenglish/product_bookx_info.php):
I presume it should be PHP Warning: include_once(DIR_FS_CATALOG_LANGUAGES/english/product_bookx_info.php):
I have looked at the code on the page class.bookx_observers.php and can't see a problem with the path.
Any ideas?
Thanks
B
-
Re: no way to proceed to the update via admin>>tools
Hi Breda,
DIR_FS_CATALOG_LANGUAGES is a php constant defined to point to the path of the languages folder of your installation. It is defined inside [youradmin]/includes/configure.php
If this constant is not defined when the php script runs, then the script inserts the literal name of the constant, i.e. "DIR_FS_CATALOG_LANGUAGES", which is why it shows up in the error message.
I will quickly run the script here to see why this constant is not defined, possibly because it is only defined inside the [admin] file described above. Although I'm surprised I never got the error here...
Best,
p
-
Re: no way to proceed to the update via admin>>tools
The constant DIR_FS_CATALOG_LANGUAGES is in fact only defined for the admin backend, so that is why there is an error. For some reason my PHP always ran over this error without stopping the script, so that is why I never noticed. :)
Anyway, until this is fixed in a next release, please modify the lines inside includes/classes/observers/class.bookx_observers.php on line 554
OLD:
include_once DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/product_bookx_info.php';
include_once DIR_FS_CATALOG_LANGUAGES . $_SESSION['language'] . '/extra_definitions/product_bookx.php';
NEW:
include_once DIR_FS_CATALOG . 'includes/languages/' . $_SESSION['language'] . '/product_bookx_info.php';
include_once DIR_FS_CATALOG . 'includes/languages/' . $_SESSION['language'] . '/extra_definitions/product_bookx.php';
Let me know if that works.
Best,
p.
-
Re: no way to proceed to the update via admin>>tools
Hi P,
I've made that change and I'm still getting an error but it's a different one now.
I am chosing a product that has the colour attributes ( the zen cart standard ones) and the log file is showing this error now:
[06-Nov-2013 19:03:49] PHP Fatal 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 ':4a7c8ee9be3c480825a33121ab45d533,31)
GROUP BY be.products_id' at line 8 :: SELECT be.products_id, be.volume, bed.products_subtitle,
CONCAT_WS("-", SUBSTRING(be.isbn,1,3), SUBSTRING(be.isbn,4,1), SUBSTRING(be.isbn,5,6), SUBSTRING(be.isbn,11,2), SUBSTRING(be.isbn,13,1)) AS isbn_display,
GROUP_CONCAT(DISTINCT a.author_name ORDER BY a.author_name ASC SEPARATOR " | ") AS authors
FROM product_bookx_extra be
LEFT JOIN product_bookx_extra_description bed ON bed.products_id = be.products_id AND bed.languages_id = "1"
LEFT JOIN product_bookx_authors_to_products atp ON atp.products_id = be.products_id
LEFT JOIN product_bookx_authors a ON atp.bookx_author_id = a.bookx_author_id
WHERE be.products_id IN (106:4a7c8ee9be3c480825a33121ab45d533,31)
GROUP BY be.products_id in /hsphere/local/home/garrettmallon/garrettmallon.com/upgrade/includes/classes/db/mysql/query_factory.php on line 120
########################################___
I am wondering if the issue is that the Book X uses a seperate database and there is no table for the colour attributes? If that is the case I would have thought that it would not display the standard zen cart attributes on the browser view, it works fine until you click Add to Cart. You can try it here:
http://www.garrettmallon.com/upgrade...roducts_id=106
Thanks for your help, I'd appreciate if you can respond asap as Client is testing tomorrow!
Regards
Breda
-
Re: no way to proceed to the update via admin>>tools
Hi Breda,
BookX uses the "normal" table for ZC products and then just adds the BookX specific fields in an extra table, so that shouldn't get in the way of your using attributes.
I have never used ZC attributes before, but quickly looking into the issue it seems to me the way ZC internally deals with identifying products with attributes doesn't play nicely with BookX.
I will do my best to test this here in the next days and hopefully find a quick fix.
p.
-
Re: no way to proceed to the update via admin>>tools
Thanks P,
It seems to be the add to cart step that causes the error and if you go back a step in the browser you'll see that the side box for Shopping cart has the product added in, so it seems to add it to the cart but can't display the cart page.
Regards
Breda
-
Re: no way to proceed to the update via admin>>tools
Hi Breda,
this needs another change inside , which will be part of the next release:
I'm not sure of the line numbers you have after the first change, but I'm sure you will find it. Should be somewhere after line 550.
replace this line:
$ids[$product['id']] = $key;
with these lines:
if (!empty($product['attributes'])) {
//*** this product with attributes, so ID needs to be cleaned
$id_parts = explode(':', $product['id']);
$ids[$id_parts[0]] = $key;
} else {
$ids[$product['id']] = $key;
}
Hope that works. Let us know.
Best,
p.
-
Re: no way to proceed to the update via admin>>tools
Hi P,
Brilliant that fixed it!
I must make a donation to your site.
Thanks,
Breda
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
breda
Hi P,
Brilliant that fixed it!
I must make a donation to your site.
Thanks,
Breda
Glad it works now.
I'll buy the cat some caviar then ;)
Best,
p.
-
Re: no way to proceed to the update via admin>>tools
-
Re: no way to proceed to the update via admin>>tools
Hey Breda,
thank you so much for your donation!
I'm working on the 1.0 release. Currently testing the plugin in a real-life shop environment and I discover a few little bugs so once that's fixed I'll post it here.
Best wishes,
p.
-
Re: no way to proceed to the update via admin>>tools
I have been helping a friend with a bookstore site and have installed your plugin. It is at resurrectedreads.com. A couple of immediate issues that I was wondering about.
1. Bulk import? Can the info be imported at all from a csv or spreadsheet?
2. On a book detail page, there is a section "Other books by %s:" Can this be fixed to have the authors name?
Thanks for the help in advance, and keep up the good work!
Brice
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
bwidener
I have been helping a friend with a bookstore site and have installed your plugin. It is at resurrectedreads.com. A couple of immediate issues that I was wondering about.
1. Bulk import? Can the info be imported at all from a csv or spreadsheet?
2. On a book detail page, there is a section "Other books by %s:" Can this be fixed to have the authors name?
Thanks for the help in advance, and keep up the good work!
Brice
1: Bulk import should be possible, when you use Easy populate 4 it is very easy to add extra field you would like to add to the import besides the standard fields.
2: Not sure why you see %s but that should automatically be replaced by the name of the author, maybe philou van help with that.
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
Design75
1: Bulk import should be possible, when you use Easy populate 4 it is very easy to add extra field you would like to add to the import besides the standard fields.
2: Not sure why you see %s but that should automatically be replaced by the name of the author, maybe philou van help with that.
Thanks to Design 75 for suggesting Easy Populate. I have in fact never used that, so I can't say too much about it.
I don't know if Easy Populate can also create product entries for other types than "Product - General". If you can get your books into the shop as "Product General" you can use the BookX Tool to convert those to product type "BookX".
That saves you already some time, but it will only work with basic info, your Bookx "extra info" will have to be added by hand (or directly in the MYSQL DB, but that's tricky). BookX has it's own table for special fields like "subtitle", "ISBN" etc. I doubt that Easy Populate can find those and populate them correctly. Quickly looking at the code I also see a shortcoming in my code for the conversion of "Product - general" to "BookX". Now is however not a good time for me to improve this. I will put it on my list for the next release planned for January 2014. A bulk-import via BookX Tool should not bee terribly difficult for me to add, but most probably not for the 1.0 release.
2.) That the "%s" is in your HTML output is very strange. I thought the PHP command "sprintf" fails gracefully, meaning it should in the worst case show "Other books by :", but not the variable placeholder "%s"
Also, on the page I saw on your site, you do have an author assigned to the book, so I don't understand why it is not shown there then. Must in fact be a bug. Since it works here, I'm not sure for the moment how to proceed finding the bug there. Do you have debugging on in your Shop? If so, maybe there is something relating to this in the debug logs in the "cache" folder of your site? Just make a page request and see if a brand new log appears.
Another possibility is that it is a bug that I already fixed in my current development version of the plugin, but again I can't check that now unfortunately.
Hope all that helps you along !
Best,
philou
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
philou
Thanks to Design 75 for suggesting Easy Populate. I have in fact never used that, so I can't say too much about it.
I don't know if Easy Populate can also create product entries for other types than "Product - General". If you can get your books into the shop as "Product General" you can use the BookX Tool to convert those to product type "BookX".
That saves you already some time, but it will only work with basic info, your Bookx "extra info" will have to be added by hand (or directly in the MYSQL DB, but that's tricky). BookX has it's own table for special fields like "subtitle", "ISBN" etc. I doubt that Easy Populate can find those and populate them correctly. Quickly looking at the code I also see a shortcoming in my code for the conversion of "Product - general" to "BookX". Now is however not a good time for me to improve this. I will put it on my list for the next release planned for January 2014. A bulk-import via BookX Tool should not bee terribly difficult for me to add, but most probably not for the 1.0 release.
2.) That the "%s" is in your HTML output is very strange. I thought the PHP command "sprintf" fails gracefully, meaning it should in the worst case show "Other books by :", but not the variable placeholder "%s"
Also, on the page I saw on your site, you do have an author assigned to the book, so I don't understand why it is not shown there then. Must in fact be a bug. Since it works here, I'm not sure for the moment how to proceed finding the bug there. Do you have debugging on in your Shop? If so, maybe there is something relating to this in the debug logs in the "cache" folder of your site? Just make a page request and see if a brand new log appears.
Another possibility is that it is a bug that I already fixed in my current development version of the plugin, but again I can't check that now unfortunately.
Hope all that helps you along !
Best,
philou
In which file would I find the "Other books by"? I would like to change it to "Other books by this author" or something generic like that.
Brice
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
bwidener
In which file would I find the "Other books by"? I would like to change it to "Other books by this author" or something generic like that.
Brice
You can find it in (arround line 52)
\ZC_INSTALLATION\includes\languages\YOUR_LANGUAGE\product_bookx_info.php
-
Re: no way to proceed to the update via admin>>tools
Quote:
Originally Posted by
Design75
You can find it in (arround line 52)
\ZC_INSTALLATION\includes\languages\YOUR_LANGUAGE\product_bookx_info.php
In addition I suggest that you use the ZC override mechanism, so make a copy of \ZC_INSTALLATION\includes\languages\YOUR_LANGUAGE\product_bookx_info.php and put it into \ZC_INSTALLATION\includes\languages\YOUR_LANGUAGE\YOUR_TEMPLATE\product_bookx_info.php and make you changes in the copied file.
Also please be advised that BookX arranges the "Other books by" in a more complex manner (at least as of the next version :-)
If a book has three authors X,Y and Z, then first there will be "Other books by X, Y and Z" with the same team of 3 authors, then individually "Other books by X", "Other books by Y", "Other books by Z". Books which are listed as "by the same team" do not display again in the individual lists for each author.
This is in order to differentiate which of the authors the referred book is by and at the same time not repeating the same title over and over on the same page.
All this to say that changing the Text to "Books by the same author" will possibly give you some unexpected results, unless all your books ever only have one author.
Best,
philou
-
Re: no way to proceed to the update via admin>>tools
Hello philou and thanks for your great module. I've instaled it on a test site and i want to use it with the Tabbed products module.
I have a problem with the filter sidebox as it only shows filters for author and series and another problem is that if i try to use the filter, it doesn't show the books asigned to the respective author or series.
Do you have any idea why?
-
Re: no way to proceed to the update via admin>>tools
Hi,
hard to troubleshoot it based on the info you give. I haven't changed anything on the filter module in recent releases, so it couldn't be a new bug. If you want to filter e.g. by genre, have you created some genres and assigned it to some products? Also, does the filter work if you create a URL manually as described here: http://sourceforge.net/p/zencartbook...Configuration/
Lastly, do you find anything in the ZC debug log, found in the folder "cache", which might give me some more info?
Best regards,
p.
Quote:
Originally Posted by
suportafaceri
Hello philou and thanks for your great module. I've instaled it on a test site and i want to use it with the Tabbed products module.
I have a problem with the filter sidebox as it only shows filters for author and series and another problem is that if i try to use the filter, it doesn't show the books asigned to the respective author or series.
Do you have any idea why?
-
Re: no way to proceed to the update via admin>>tools
I have instaled the 9.2 version. I think that part of my problem is that nothing gets written in the product_bookx_extra table but it does in the product_bookx_extra_description. I can PM you my site if you have time to figure this out with me.
-
Re: no way to proceed to the update via admin>>tools
The problem was solved with the help of philou. The problem was with the content of my database.
-
Re: no way to proceed to the update via admin>>tools
Hey, glad you found what the problem was!
-
1 Attachment(s)
Re: no way to proceed to the update via admin>>tools
Hi philou,
I have installed 0.92 ver. on my Japanese site and It works great!!!.
Just one question.
I have 3000 over authors on my site.
So I feel some difficulties finding an author with "drop-down list box".
Is it possible to add "the searchbox" on admin section?
Attachment 13645
Best Regards,
oldcat
-
Dropdown Authors with search functionality
Hi Oldcat,
glad to hear it works for you as well!
It should not be too difficult to implement search or "type ahead" functionality into the dropdown for authors on the product editing page in the Admin backend. However, I still have a few other items on my list to resolve for the 1.0 release which I keep postponing to include extra functionality :)
So I can't tell you how soon I can get to including this
Best regards,
p.
-
Re: Dropdown Authors with search functionality
Hi philou,
Thank you for your quick response.
It's good to hear that it is not too difficult to implement these functions.
Thanks anyway.
Best regards,
oldcat
-
Re: Dropdown Authors with search functionality
Hi Oldcat,
of course you are aware that some browsers already provide part of the functionality you describe: You click once on the pop-up with the author names, so the pop-up stays open and then you just start typing on the keyboard and the pop-up highlights entries which begin with the letters you type. Hitting ENTER selects what is highlighted in the popup. In Firefox this works, although I do not know if this works when you enter japanese characters. This will only pick up the first characters so if you look for "Osamu Tezuka" you can only find it by typing "Osam.." not by typing "Tezu
"
Maybe you can do it this way until there is a full search functionality in BookX.
Best wishes,
P.
-
Re: Dropdown Authors with search functionality
Hi philou,
Thank you very much for your really useful suggestion.
I have not been aware of this browser's functionality until today.
I tried it and found that it does not work with Japanese/Chinese characters.
So I have made some "dummy" authors for index with alphabetical characters.
It really works and It does shorten my search time.
I will make a donation to your cat.
Thank you again.
Best Regards,
oldcat
-
Re: Dropdown Authors with search functionality
Hey Oldcat,
many thanks for your donation!
I'm happy you have a method that works great idea to insert "dummy" authors :)
Best regards,
philou
-
Multisite
Hello,
I have another question. I use Multisite modul and it has a function that you can show some categories on one site and other on other site. It uses a function called cat_filter by witch it filters the products (for sideboxes and search). Does anyone have an idea how or where i should try to use this function so that it does the same for the filter sedebox function of bookx?
-
Re: Multisite
I forgot to mention that the sidebox bookx filter is working in this maner, only the function that shows all books by the same author doesnt work, as it shows all the books asigned to that author, not just the ones asignet to the current store.
-
Re: Multisite
Hi sup,
can you give a bit more info :
If you filter for a specific author "Joe" with ID 42 in the BookX sidebox, then it shows correctly all books by "Joe" assigned to your current store, is that right? (The URL should reflect the use of the author filter like for example "YOURSHOP.COM/index.php?main_page=index&typefilter=bookx&bookx_author_id=42")
Does the multisite plugin add another filter to the URL at this point?
If you choose the entry "show all authors" in the bookx filter, there is the link "Show books by Joe" after author "Joe". If you click on this link, then it shows all books by Joe for all stores? Does this exactly describe the problem? If yes, then what does the URL look like? Because in my development shop system it shows exactly the same URL as the filter pop-up in the example above, so if it is different, that could be a problem.
Let me know what the situation is with that, or if it is another point where "Show all books by author" is not working.
Regards,
p.
Quote:
Originally Posted by
suportafaceri
I forgot to mention that the sidebox bookx filter is working in this maner, only the function that shows all books by the same author doesnt work, as it shows all the books asigned to that author, not just the ones asignet to the current store.
-
Re: Multisite
So, another of my rushing thru things. The Advanced search is the one that works as when i search for an author it only shows the products of the respective author for the curent site.
The bookx filter doesn't care about my category alocation and shows all the products by that author.
I tryed al kinds of places to put the cat_filter in but to no avail.
The statements used in the Advanced search for the category filtering is
Code:
$listing_sql = cat_filter($select_str . $from_str . $where_str . $order_str);
and an example used in the "New product listing"
Code:
$check_products_all = $db->Execute(cat_filter($products_new_split->sql_query));
Do you have any idea what and where to change someting to make this work?
-
Re: Multisite
Hi sup,
sorry, but I'm not really an expert on how the multi-site plugin works. Here are two thoughts:
There is a bookx function which runs on all pages that list multiple products and it is in YOUR CATATALOG/includes/classes/observers/class.bookx_observers.php. The function is called update_product_listing_with_bookx_attributes and around line 454 there is this:
Code:
$listing_split = new splitPageResults($listing_sql_new, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
You could try adding your cat_filter there. Possibly this results in the cat_filter being called twice during one execution of the script, once here and once inside the product listing template, I don't know.
The more restrictive call to cat_filter could be placed inside YOUR CATATALOG/includes/index_filters/bookx_filter.php around line 122 there is $listing_sql = 'SELECT ' . $select_column_list . $select_table_list . ' WHERE ' . $select_where_conditions . $alpha_sort; which is only called when there is a BookX filter active.
Attention: When a bookx filter is active, the filter code above is called first, and then the observer code is called as well a bit later, so adding cat_filter in both places means it will be called twice by BookX when filters are active.
Hope that helps you along!
Regards,
p.
-
Re: Multisite
The first statement for the observers solved the problem with the sidebox.
This is the modified statement in case some one else needs it:
Code:
$listing_split = new splitPageResults(cat_filter ($listing_sql_new), MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
The problem with the Books by the same Author in the product description page was solved by adding the cat_filter in the template tpl like this:
Code:
echo cat_filter($authors_related_products_html);
Thank you verry mutch for your help and if you need testing with new versions of your module you can count on me.
-
Re: Multisite
Hi,
I'm happy to hear that it works. It is quite surprising that this should fix something:
Code:
echo cat_filter($authors_related_products_html);
Since "echo $authors_related_products_html;" simply outputs the HTML previously assembled by the PHP code further up in the bookx_product_info file. I don't see how the cat_filter function is able to go through that HTML and decide which books don't fit the categories of your site. Are you sure that you didn't do something else as well?
Anyway, if it works then there's nothing to complain :)
Regards,
p.
-
Re: Multisite
:D I manage (the easyest way that i found) to put the extra info on separate tabs (I also use Tabbed Products Pro v1.10) by using the moving the extra info from the tpl_product_bookx_info_display to a custom tab so that is probably why it's working in that manner.
Unfortunatly i keep trying to cut conrners and maby that is way I scramble things up.
-
Re: Multisite
Hi phil,
Thank you for all your hard work on this! I've been testing it out over the last few days and absolutely love the extra flexibility it will give me. :-)
I do have a couple of questions -- I'm not sure if these are bugs or if I've screwed something up, and I apologize in advance for the length of this post. I'm using the beta .92 version from SourceForge, on a test environment running zen 1.5.1.
When I installed, I ran into the error "WARNING: An Error occurred, please refresh the page and try again." Everything seemed to install okay, as all the listings showed up correctly under the admin Extras menu and also under Product Type. When I checked my logs, I found this:
Quote:
[27-Jan-2014 11:28:14 America/Denver] PHP Fatal 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 '(configuration_title, configuration_key, languages_id, configuration_description' at line 1 :: REPLACE INTO (configuration_title, configuration_key, languages_id, configuration_description, last_modified, date_added)
VALUES
# settings for product type bookx only
('Artikelliste: Artikelnummer anzeigen', 'SHOW_PRODUCT_BOOKX_LISTING_MODEL', 43, 'Artikelnummer in der Artikelliste anzeigen.', now(), now()),
It goes on with a bunch more German settings, and ends with:
Quote:
; in /home3/lesstha1/public_html/ztest/includes/classes/db/mysql/query_factory.php on line 120
I'm not sure if this affected anything or if it's related to any of the other issues I've encountered, but I figured it couldn't hurt to mention. The biggest problem I've run into is that the filter links don't work for me. The syntax is correct, so far as I can tell -- /index.php?main_page=index&typefilter=bookx&bookx_genre_id=6 -- but I get that same "WARNING: An Error occurred..." message when I click any of the links. Is there something I need to turn on for this? My site's design doesn't use sidebars, so if I need to turn on something behind the scenes, let me know. The log for this says:
Quote:
[27-Jan-2014 11:43:41 America/Denver] PHP Fatal error: 1054:Unknown column 'm.manufacturers_name' in 'field list' :: SELECT p.products_image, pd.products_name, m.manufacturers_name, p.products_quantity, p.products_id, p.products_type, p.master_categories_id, p.products_price, p.products_tax_class_id, pd.products_description,
IF(s.status = 1, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status = 1, s.specials_new_products_price, p.products_price) as final_price,
p.products_sort_order, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status, prodt.type_handler AS product_type_handler FROM products p
LEFT JOIN products_description pd ON (pd.products_id = p.products_id AND pd.language_id = "1")
LEFT JOIN specials s on p.products_id = s.products_id
LEFT JOIN product_types prodt ON prodt.type_id = p.products_type
LEFT JOIN product_bookx_extra be ON be.products_id = p.products_id LEFT JOIN product_bookx_genres_to_products gtp ON gtp.products_id = be.products_id
LEFT JOIN product_bookx_genres g ON gtp.bookx_genre_id = g.bookx_genre_id
LEFT JOIN product_bookx_genres_description gd ON gd.bookx_genre_id = gtp.bookx_genre_id AND gd.languages_id = "1" WHERE p.products_status = 1 AND g.bookx_genre_id = "6" order by p.products_sort_order, pd.products_name in /home3/lesstha1/public_html/ztest/includes/classes/db/mysql/query_factory.php on line 120
One of the other things I've run into is that when I update a product with the Bookx product type, the description disappears after I save it. This used to be an issue for me before I upgraded to 1.5.1 and PHP 5.4, but I haven't encountered it in ages. The products still assigned "Product - General" type don't have this problem.
Other, more minor things -- I can't get the series to display on the product info page, no matter what I do, and when adding multiple authors to a product, only one (the last one assigned) is saved (going back in and adding another is fine -- it only saves one per edit). (I had no problem adding multiple genres works fine.)
If you need any more information or want me to test anything, let me know. Thanks again!
Sasha
-
Re: Multisite
Hi Sasha,
the warning during install seems to be caused by a missing table in the SQL statement. That table name is supposed to be inserted by means of a variable, so I suspect this is not working due to ZC version 1.5.1. Unfortunately I am away from my development environment at the moment, so I can only look into this again next monday.
The statements after the failed SQL statement are not crucial for the BookX plugin operation, but they should be executed, which they are not in your case due to this error. If you want to fix this urgently, you could comment out this step in the Bookx installation script. If you don't see what I mean by that, then maybe you better leave it until I can check it out next week :-)
The filter seems to have another SQL problem, maybe I had disabled display of manufacturer info in my dev shop and therefore never encountered this bug? Whatever the reason, you may be able to circumvent this by disabling the display of manufacturer info in product listings for now until I find the bug.
Disappearing product description and missing display of series are bugs which I am aware of and which are already fixed in my current development version.
I really hope to be able to publish this soon!
Best regards,
p.
-
Re: Multisite
I found the SQL statement and managed to comment it out without killing anything. That ran successfully, with just a warning about my template overrides (which were done on purpose in the name of testing out some product display formatting, so the warning is valid ;3).
For the filter, I tried turning off the manufacturer on the bookx and then onall other product types, but I'm still running into the error when I click on any of the filters. I get the same error in the log, too.
If there's anything you want me to test or try for you, let me know, I'm more than willing to help out. (Also, no rush on my behalf; I'm looking forward to implementing, but it's not time sensitive or anything, and I appreciate the work you're putting into it.)
Thanks again!
Sasha
-
Re: PHP/SQL Errors
Hi Sasha,
fine. I forgot to adress the problem of only the last author being registered in the DB when editing productinfo, this problem is new to me indeed, as it has worked here without problems. I will let you know if I don't succeed to replicate the error.
So more on all this in a weeks time.
Regards,
p.
-
Bug: Error combining bookx filters with manufacturer
Hi Sasha,
the manufacturer error is really a bug. Here is how you can fix it until a new version is out.
in [YOUR_ZEN_CART_INSTALLATION]/includes/index_filters/bookx_filter.php you have to change the code around line 76
from this:
Code:
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_EXTRA . ' be ON be.products_id = p.products_id';
to this:
Code:
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_EXTRA . ' be ON be.products_id = p.products_id
LEFT JOIN ' . TABLE_MANUFACTURERS . ' m ON m.manufacturers_id = p.manufacturers_id';
That should make the error go away.
I am stil looking into the installation script, but this way you can keep working.
Regards,
p.
Quote:
Originally Posted by
nikerymis
I'm not sure if this affected anything or if it's related to any of the other issues I've encountered, but I figured it couldn't hurt to mention. The biggest problem I've run into is that the filter links don't work for me. The syntax is correct, so far as I can tell -- /index.php?main_page=index&typefilter=bookx&bookx_genre_id=6 -- but I get that same "WARNING: An Error occurred..." message when I click any of the links. Is there something I need to turn on for this? My site's design doesn't use sidebars, so if I need to turn on something behind the scenes, let me know. The log for this says:
-
Re: Bug: Error combining bookx filters with manufacturer
That did the trick! Everything is working for me now, and I'll probably implement on our live site later this week. Any chance I could get the fix for the disappearing product descriptions? I can use my workaround if not (updating product descriptions in the database directly), but that's probably the biggest remaining issue, user-flow-wise for me.
Thanks again!
Sasha
-
Re: Bug: Error combining bookx filters with manufacturer
Hey Sasha,
many thanks for the donation, that is very kind of you and much appreciated!
I am considering to release yet another Beta version, even if I was hoping to make the jump to 1.0 directly. I'm worried that giving you some files from the next release will introduce other problems when combined with files of a previous version, so i prefer not to do it that way.
I'll see what I can do...
Regards,
p.
-
Re: Bug: Error combining bookx filters with manufacturer
Hey Phil,
No problem! :)
I'm pulling for another beta release, but I can also hold my horses and wait for a 1.0 release. Whichever you want to do, I will still be using. :)
Sasha
-
Re: Bug: Error combining bookx filters with manufacturer
Sasha,
could you give me more details about the disappearing product descriptions: Are you saying that when converting products from another product type to bookx the descriptions are lost? Or do you mean that after your created a new product of type Bookx and entered a description, this description is somehow lost if you edit the product again and save the changes? I can't reproduce the problem in my development shop running the 0.9.2 version you are using.
Best,
p.
-
Re: Bug: Error combining bookx filters with manufacturer
Converting is fine; when I go in to update the book, the description is still there. It's when I make any changes and go through the preview/update that the description is wiped. (Specifically, it's wiped on update, not preview). I don't actually have to make any changes at all -- I just clicked through on one of my bookx products without making any changes and it wiped. It is limited to the bookx products, too, as I ran through a general product and had no issue.
If it helps, I'm on PHP version 5.4.24 and 5.5.35 on SQL.
Sasha
-
Re: Bug: Error combining bookx filters with manufacturer
Hi Sasha,
I found the bug concerning addition of multiple authors at once. But I can't replicate the lost description issue. Maybe this could be in combination with a WYSIWYG editor? Could you try to turn the editor off and just use a plain text field? If it also wipes the description then I should keep looking into the script
I just need to add a few lines to the documentation and then version 0.9.3 can be posted.
Regards,
p.
-
Re: Bug: Error combining bookx filters with manufacturer
I only have a Plain Text editor. Unless there's an option I'm not seeing, but plain text is all I've ever used, and I can't find a WYSIWYG option anywhere. Are you using a WYSIWYG editor on your install? I'm willing to add additional plugins to see if that helps. I'm also willing to wipe my current test environment and start fresh with 0.9.3 to see if that helps in anyway.
I don't know if this is relevant, but I was running into this problem on occasion with the general products when I was still on 1.3.9h and on PHP 5.4, but upgrading to zen cart 1.5.1 / PHP 5.4 fixed that.
-
New Version 0.9.3 beta on Sourceforge
There is an updated beta version ready to download on sourceforge. It mainly fixes some bugs discussed here in the forum and some others I discovered myself :)
There is really only one new feature worth mentioning, which is the option to sort products in any product listing view (including Bookx filter results) by date of availability, placing CSS hooks on the TR elemnts for products "upcoming-product" and "new-product", so you can also style them differently.
If this is not for you, it can be turned off altogether in Admin->Catalog->Product Types->BookX Type->edit layout.
If anybody has a disappearing description problem, the experience of nikerymis might help:
Quote:
It looks like the problem was the stock by attributes plugin I've been using (this one:
http://www.zen-cart.com/downloads.php?do=file&id=202). Removing it in my test environment fixed that bug -- the product descriptions are no longer disappearing on me. I'll probably remove that in the live environment as well, since we're implementing a different process to deal with our stock. :-)
Thanks,
Sasha
Regards,
p.
-
Re: New Version 0.9.3 beta on Sourceforge
An update on the disappearing product descriptions -- this problem was not caused by the Stock by Attributes plugin as I'd originally thought. It was an intermittent issue, which is why it appeared to be corrected when I tested after uninstalling Stock by Attributes.
The real cause of the error (and it took me an age to sort this out) was special characters in the product description. If the product description contained an emdash, an accented character, an ellipses character (not three periods, but one single character with three dots), the product description disappeared. Replacing these special characters with their HTML # codes fixed the issue completely. :-)
For reference, these are the HTML codes for special characters that I'm referring to: http://www.ascii.cl/htmlcodes.htm
- Sasha
-
Re: New Version 0.9.3 beta on Sourceforge
Hi Philou
I really do not know, whether i am placing my issue at the right place,
I have set up the bookx addon, and the bug i am getting is as under
1. There are several books which have multiple authors and multiple subjects, when ever the filter searches this kind of author, i get a sub filter which says "Text_all_music _genre" and another box asking for "items starting with", selecting anything brings me back to the index page. Except for this everything seems working fine,
Help required
Cheers
-
Re: Bug: Error combining bookx filters with manufacturer
Hi Desmat,
is your site online or do you only develop on your local machine? If you are already online somewhere, you could send me the URL (by private message of you prefer) and I could see better what your situation is. I am assuming you are using the sidebox with Bookx Filters, correct? Are you saying you get an additional pop-up inside that sidebox? Or are you on a result page for the search / filter?
If your site is not online, then the request URL could help me (or you ) in finding out what is going on. The Bookx Filters sidebox simply adds something to the URL to search for authors, like "&typefilter=bookx&bookx_author_id=14" for example looks for author with ID 14.
It would be especially interesting what the requested URL is which takes you back to the index page.
Regards,
p.
-
Re: Bug: Error combining bookx filters with manufacturer
Hi,
I'm using v1.5.1, and I tried to install. It fell flat. Nothing happened. I THINK the problem might have been the code I patched into tpl_tabular_display.php, as per the directions. Now, the directions say to paste that right at the top. I did. I also tried pasting it just below the text portion and one other place near the top of the file. Still nothing. The first paste was done with a text editor. When I started testing placements of the line in DreamWeaver, it REALLY didn't like anywhere I was trying to place that line. So... Can anyone tell me, with reference to another line in the file, what the proper place to put it would be? I would REALLY appreciate it, because this looks like a great plug-in.
Thanks,
DML
-
Re: Bug: Error combining bookx filters with manufacturer
Hi DML,
you are right, it's a nice little plug-in, so let's see if we can get it to work for you. To get to the root of the problem, let's calrify this: When you say "nothing happens" and you are looking at a page where "tpl_tabular_display.php" is being used, then you are looking for example at the product listing of a certain category which has Bookx-type products in the listing, yes? If BookX is working correctly, you should then see extra infos for these BookX products in the listing, for example an author or the ISBN. To test this further you could make a category in the admin backend called "bookx testing" and add one Bookx-type product there: "Bookx Test Product".
Now when you are listing the category "bookx testing" in your shop, it shows "Bookx Test Product" but in your case no extra book-info like number of pages or ISBN or author etc?
If this is the case then you are correct, the BookX plugin is not working correctly in your setup.
Why do you assume, that "tpl_tabular_display.php" is the problem? The BookX plugin tries to modify the ZC code as little as possible, so it is using the "notifier" functionality of ZC, which then calls the file [YOUR_ZC_INSTALLATION]/includes/classes/observers/class.bookx_observers.php. In the case of tpl_tabular_display.php there was no "notifier" which is why it has to be inserted manually. It must be placed anywhere in the file BEFORE the variable $list_box_contents is being used, because the Bookx Observer inserts the extra book info into $list_box_contents before it is then output into HTML.
If you want to test functionality of Bookx with a debugger, try setting a breakpoint inside [YOUR_ZC_INSTALLATION]/includes/classes/observers/class.bookx_observers.php to see if this file is being called. If it isn't then check if you have really copied all the BookX php files in the correct places or if maybe one is missing.
For example the function "update" around line 154 inside class.bookx_observers.php is a good place for a break point, because that function is called every time the BookX plugin is inserting something somewhere. For tpl_tabular_display.php it should stop at the "switch" option "NOTIFY_TEMPLATE_PRODUCT_LISTING_TABULAR_DISPLAY_BEGIN" which is the notifier you inserted into tpl_tabular_display.php.
Let's see what all this does for you :)
Regards,
p.
-
Re: Bug: Error combining bookx filters with manufacturer
Quote:
Originally Posted by
philou
you are right, it's a nice little plug-in, so let's see if we can get it to work for you. To get to the root of the problem, let's calrify this: When you say "nothing happens"
Now when you are listing the category "bookx testing" in your shop, it shows "Bookx Test Product" but in your case no extra book-info like number of pages or ISBN or author etc?
Why do you assume, that "tpl_tabular_display.php" is the problem?
When I say nothing happens, I mean that I can't even get it to install. I put in the http://[YOUR-SHOP-URL]/[YOUR-ADMIN-FOLDER]/?action=bookx_install URL (security being what it is, I don't want to paste it here, of course), and I get a 404 NOT FOUND error. If I name my shop instead of my admin, it just shows me the shop, and if I name my shop AND my admin, as I would to log into the admin, it shows me the log-in page for admin. Doing it precisely as directed gets me a 404. So...nothing. Nothing changes and the module isn't initializing. I've double checked, and all the files are in place, as ordered. Honestly, I'm not sure what I could be missing. Aside from little nits, I've never faced one that simply wouldn't move, so I have to assume I'm doing something wrong. Darned if I know WHAT I'm doing wrong, but something.
And no, I can't get as far as seeing the BookX options in the admin. If I got that far, I would consider it a nit I'm dealing with. So, testing to see if a file is being called won't help, because it's not calling anything right now. Grin...
To be honest, I fixated on the tabular file for only two reasons... The directions for that one weren't all that specific, and DW hated where I was trying to place the code. Shrug. If it doesn't matter, it doesn't, and that's not my problem. Scratch it off the list, I say.
Thanks for your help, though. Hopefully, I can figure out where I'm messing up eventually.
DML