Forums / Setting Up Categories, Products, Attributes / Creating an add-on "product type book" for ZC 1.5

Creating an add-on "product type book" for ZC 1.5

Views: 111,142

Results 421 to 427 of 427
8 Mar 2019, 11:55 PM
#421
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Creating an add-on "product type book" for ZC 1.5

I had that issue also. I actually created a new table just for search.
But you could also had some indexes to the data base tables. (Ex: author name, publisher name, etc)
But I'm not on my desktop right now. But that's the way to go.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

10 Mar 2019, 7:58 PM
#422
mesnitu avatar

mesnitu

Totally Zenned

Join Date:
Aug 2014
Location:
Lisbon
Posts:
597
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

pititis:

Hello,

I'm unable to use simple or advanced_search. I have more than 100K books. It takes forever (and 100% CPU.) Server here is a new Xeon with 8 Gb Ram and SSD disk

Commenting the lines $extra_from and $extra_where in the function insert_book_attributes_into_search_query fix the issue (obviously) returning the search queries in no more than 1.4-1.6 seconds (0.5 when cached)

Sorry I'm not a mysql guy. Any clue please?

Cheers

Not sure if you manage to improve the queries search time, but, in phpmyadmin ( or) you could add some indexes, like:

ALTER TABLE product_bookx_authors
ADD INDEX idx_bxa_author_name (author_name ASC);

This would apply to isbn, publisher name, series_name, etc...

I run into this issue on about 10k books. But I did to separate things, one was add index keys to database, other was to create a new table that I actually needed to quick access.

I think with this extra indexes, is enough.

“Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

11 Mar 2019, 12:33 AM
#423
pititis avatar

pititis

New Zenner

Join Date:
Oct 2010
Location:
Andalucía
Posts:
15
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

Thanks you,

Yes, yesterday that index was added to the product_bookx_authors table but I'm still playing with more indexes. I will add tomorrow the rest from your list.

I want to remove some LEFT JOIN to make the query better, the idea is to search into author, publisher and maybe genre.

Thanks for your time, I will post again soon.

Boas noites

11 Mar 2019, 7:36 PM
#424
pititis avatar

pititis

New Zenner

Join Date:
Oct 2010
Location:
Andalucía
Posts:
15
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

Hi,

Finally I did a few modifications, in my case I want to add author in the search query (products_name OR products_model OR scrchba.author_name). isbn=model.

The unnecessary LEFT JOINS were deleted and the rest ( product_bookx_authors_to_products and product_bookx_authors) changed to INNER JOIN. it seems to be working fine (still testing)

Cheers

24 Oct 2019, 11:35 AM
#425
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

I know a lot of work has gone into bookx, however, does it now work with the latest version of Zen Cart?

Learning Fast.
Eden Craft Supplies

3 Jun 2020, 5:05 PM
#426
papanco avatar

papanco

New Zenner

Join Date:
Jun 2018
Posts:
20
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

I tried to install it on 156C with PHP 7.3 but it doesn't work: can you help me?
From "product_types" I can't find Product - BookX

An intelligent person knows what to say.
A wise person knows whether to say it or not.

8 Mar 2021, 4:14 PM
#427
adb34 avatar

adb34

Totally Zenned

Join Date:
Mar 2008
Location:
Brampton, Cumbria, United Kingdom, United Kingdom
Posts:
825
Plugin Contributions:
0

Re: Creating an add-on "product type book" for ZC 1.5

It is looking like this plugin is not being updated as Zencart is being updated. Pitty I did like this

Learning Fast.
Eden Craft Supplies