Re: Creating an add-on "product type book" for ZC 1.5
Hi mesnitu,
the MySQL error is a bug indeed. You can fix it as follows:
In file [YOUR_ZC_INSTALLATION] -> includes -> functions -> extra_functions -> functions_product_type_bookx.php
on lines 253 & 254 (this is the "publisher" filter query)
you need to replace "bi" with "bpub" so it looks like this:
PHP Code:
$extra_filter_query_parts['join']['publisher'] = ' LEFT JOIN ' . TABLE_PRODUCT_BOOKX_PUBLISHERS . ' bpub ON bpub.bookx_publisher_id = be.bookx_publisher_id ';
$extra_filter_query_parts['where']['publisher'] = ' bpub.bookx_publisher_id = "' . $active_bx_filter_ids['publisher_id'] . '" ';
Let me know if that solves the error for you and I will include this in another revision update asap.
As for resetting the filter, I don't yet see what your usage scenario is. I have tested it here with multiple BookX filters enabled and if I filter for genre "A" and then reset, I return to the homepage. Do you get this behaviour and do you agree that this is a good way to do it?
If I filter for genre "B" and then filter for series "XYZ" (a series which had genre "B" applied, otherwise I could not choose it from the filter popup) and then I reset the genre filter, I still get the series "XYZ" displayed, for which i was also filtering. Do you get this behaviour and do you agree that this is a good way to do it?
If we are speaking of different things, then please try again to explain again what your scenario is :)
Regards,
p.
Re: Creating an add-on "product type book" for ZC 1.5
Hi
The query change did the trick :) Thank's !
Also, now I'm using r4 .
About the reset , I think it's a template issue. As I said , this template uses new, featured and special products in a jquery tab. I also have a slider above.
So when I reset the filter (total reset), it breaks the template or the querys that the template needs to do in the homepage.
But , one thing I notice, it's upon the total reset, I get a breadcrumb Home :: genre_description , and in my homepage I don't have a breadcrumb, and the sliders and tabs only work in the homepage because they have a if ($is_home)
Am I really on the hompage ?
Quote:
If I filter for genre "B" and then filter for series "XYZ" (a series which had genre "B" applied, otherwise I could not choose it from the filter popup) and then I reset the genre filter, I still get the series "XYZ" displayed, for which i was also filtering. Do you get this behaviour and do you agree that this is a good way to do it?
It's just awsome ! :smile:
Thanks !
Re: Creating an add-on "product type book" for ZC 1.5
Hi mesnitu,
difficult for me to troubleshoot your template issue. I am aware that the breadcrumbs do not yet give meaningful "Bookx" info all the time, especially when navigating around after a filter or search. This will hopefully work better soon, like in 0.9.5.
The filters work exclusively via the GET parameters added to the URL. You can try this by hand, by adding something like &typefilter=bookx&bookx_genre_id=2 at the end of your URL and voilá: you have filtered for genre with ID #2. Now if your template also uses GET parameters for whatever reason, it could be that they are cut off when you reset the filter? Just look at your URL when your template is working and compare to when it isn't working. As far as the filters are concerned that is the only place where it can interfere in my opinion.
I think ZC assumes that if there are GET parameters in the URL, you are not on the homepage. Try deleting the bookx parameters and see if it behaves like the homepage then.
Regards,
P.
Re: Creating an add-on "product type book" for ZC 1.5
Hi
When I reset the filter I get this url :
index.php?main_page=index&typefilter=bookx&bookx_publisher_id=
But if I could get this :
index.php?main_page=index
it would be ok .
By the way : what are the options in the configuration of the filter ?, it says :
Quote:
Filter list: Size/Style
Sets the maximum length for an option list in the Book X filter sidebox. Settings this value to 0 or 1 will display a dropdown list.
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
oh I get it , if we place a 3 in the Filter list: Size/Style it gets a select form !
1 Attachment(s)
Re: Creating an add-on "product type book" for ZC 1.5
Fixing the "filter reset" needed more changes than just one line, so find attached the updated file bookx_filters.php to go into [YOUR_ZC_INSTALLATION] -> includes -> index_filters ->
Let me know if that works for you and I'll have it in the next update.
p.
Attachment 14649
Re: Creating an add-on "product type book" for ZC 1.5
Hi Philou ! :bow:
Fantastic man !
Thanks a lot !
Are you developing this module for some university project or something ? This is quite amazing, and the support and effort outstanding !
Thanks !
Re: Creating an add-on "product type book" for ZC 1.5
Hi mesnitu,
thank you for your kind words! I am developing this for our own store, which is actually not a bookstore but the shop of a small publisher. This may be why some things work like someone using them day to day would like to have them work...
The reason I can respond so quickly just now is, that I happen to work on this project anyway at this very moment. If someone finds a bug I may just as well fix that first before I tackle the ones you haven't discovered yet ;)
The workweek is usually full of publishing business, so BookX has to happen on the weekends.
It would be great, if BookX could finally come out of BETA and we could go online with this in our own store by the end of the year, but it's getting tight. Over the years I have already hacked a few versions of ZenCart for our bookselling purposes, but this time I wanted to do it right and write a proper plugin. I did underestimate a bit the time it takes to pass this on to others so it is useful, with a little documentation, allowing configuartion via ADMIN, adding langugage files etc etc.
Anyway, glad it is useful for some other people too!
Regards,
p.
Re: Creating an add-on "product type book" for ZC 1.5
Well, can't thank you enough !
I will make some suggestions as I working with the module, however, please consider them as suggestions and not asking for more features, because as I see it , bookx it's already a great tool for bookshops.
Thanks!
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
Hi Mesnitu,
very difficult to say what the problem is with so little info. Are you sure there is no DEBUG log anywhere? Check this post about where to look for it:
http://www.zen-cart.com/content.php?124-blank-page. The DENUG log should give some valuable info about what exactly is going wrong.
Regards,
p.
Hi Philou,
Yes it did fix my problem. I have come across other issues since but they are probably down to other templating issues. I've got other projects on the go so I've been on and off this shop for the last couple of weeks.
Looking forward to the next release so I can play with the filtering on author types :-)
Kinsley