thanks that seems to have fixed the problem.
now, i was adding the db commands and got the following error:
#1062 - Duplicate entry 'SEARCH_PRODUCT_BOOK_ENABLED' for key 2
Printable View
thanks that seems to have fixed the problem.
now, i was adding the db commands and got the following error:
#1062 - Duplicate entry 'SEARCH_PRODUCT_BOOK_ENABLED' for key 2
You tried to run theses MySQL queries many times, didn't you? This error message just says that you already have an entry for this key.Quote:
Originally Posted by tekram
You can remove all MySQL entries by running this queries (don't forget to replace the "zc_" with your prefix!) and then running the "add_to_mysql.txt" queries again.
(I did not yet tried this delete queries. Please let me know if it does remove all entries of "Product Type Book")Code:DELETE FROM zc_product_types WHERE type_handler = 'product_book';
DELETE FROM zc_product_type_layout WHERE product_type_id = '7';
DELETE FROM zc_layout_boxes WHERE layout_box_name LIKE 'book_%.php';
DELETE FROM zc_configuration WHERE configuration_key LIKE '%_BOOK_%';
DELETE FROM zc_get_terms_to_filter WHERE get_term_name LIKE 'book_%_id';
Can anyone assist?
I've been searching the files for the last four hours and haven't yet worked out how to turn off the following from displaying on the catalogue side when viewing the title.
Misc (bool) 1: Yes
Misc (bool) 2: Yes
Also I would like to get rid of the (p.) after 450:
Pages: 450 p.
I've tried to comment out the echo of the misc (bool) but no joy, and with the write a review button in the middle.
I have the side box review off both centre and middle in layout controller, but this seems to be showing up somewhere else.
I would also like to remove the bullets as well.
thank you
butterflyo
There is switches availables in the admin. Go to "Catalog > Product Types", click one time on "Product - Book" and then a second time, then click on the button "edit layout". You will be able to enable/disable a lot of thinks, among wich are "Show Book Misc (bool) 1" and "Show Book Misc (bool) 2" ;-)Quote:
Originally Posted by butterflyo
You can define your own value (wich can be empty) in the language file: "includes/languages/english/product_book_info.php". Find and update this line:Quote:
Originally Posted by butterflyo
to look like this:Code:define('TEXT_PRODUCT_BOOK_PAGES_UNIT', ' <abbr title="Pages">p.</abbr>');
Code:define('TEXT_PRODUCT_BOOK_PAGES_UNIT', '');
Same that for "Misc (bool)", just go to the Product Type Book Layout Page and disable "Show Product Reviews Button".Quote:
Originally Posted by butterflyo
You should just add a CSS rule for the id "productDetailsList" in a styleseet file ("includes/templates/template_default/css/stylesheet_books.css" for exemple)Quote:
Originally Posted by butterflyo
Someting like this:
Good luck!Code:#productDetailsList {
list-style-type: none;
}
--
moku
Hi Moku-
I still have not gotten around to installing your Book Type mod. But I would like to.
First I need to ask a question. I have installed qhome's new "Tabbed Products ''LITE'' version - Delimiter based" v.2.5 mod.
The mod very nicely displays the product description (and other product related objects/data) in a tabbed layout on the product info page.
See http://www.zen-cart.com/forum/showthread.php?t=37182
Do you know if Tabbed Products ''LITE'' is or could be made compatible with your Book product type (or vice versa)?
Thanks.
Woody
Hi Woody,
As far as I saw in his contrib, its only templates modifications, isn't it?Quote:
Originally Posted by Woodymon
So I'm quite sure our contribs are compatible (but have to merge files)
I think you just have to merge his tpl_product_info_display.php and my tpl_product_book_info_display.php to get both contribs cool effects :-)
--
moku
Thanks. I will investigate.Quote:
Originally Posted by moku
Moku,
Thank you for your quick response, it was the only place I didn't look, as I didn't realise you had to click twice.
butterflyo.
thanksforthe helpmoku. i was able to install the moduleandit wokrs well.
the problem i am having now is that my search function is not working. i get an error when i try to do any search. the error is below. i have not altered the db except with the commands needed for this module. could it possiby be the source?
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 'SELECT DISTINCT
in:
[select count(distinct p.products_id) as total FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ) , products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND ( p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id= p2c.products_id AND mtpd.language_id = 1 WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR (mtpd.metatags_keywords LIKE '%k%' AND mtpd.metatags_keywords !='') OR (mtpd.metatags_description LIKE '%k%' AND mtpd.metatags_description !='')) ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, product_book_extra pbe, books_to_authors bta, book_authors ba, book_authors_info bai WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND pbe.products_id = p.products_id AND bta.products_id = p.products_id AND bta.book_authors_id = ba.book_authors_id AND ba.book_authors_id = bai.book_authors_id AND bai.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_authors_name LIKE '%k%'OR book_authors_nickname LIKE '%k%'OR subtitle LIKE '%k%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, books_to_genres btg, book_genre bg, book_genre_description bgd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btg.products_id = p.products_id AND btg.book_genre_id = bg.book_genre_id AND bg.book_genre_id = bgd.book_genre_id AND bgd.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_genre_name LIKE '%k%') ) ) OR p.products_id IN ( SELECT DISTINCT p.products_id FROM products p LEFT JOIN manufacturers m USING ( manufacturers_id ), products_description pd, categories c, products_to_categories p2c LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id AND mtpd.language_id = 1, books_to_types btt, book_type bt, book_type_description btd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 AND p.products_id = p2c.products_id AND p2c.categories_id = c.categories_id AND btt.products_id = p.products_id AND btt.book_type_id = bt.book_type_id AND bt.book_type_id = btd.book_type_id AND btd.language_id = 1 AND ((pd.products_name LIKE '%k%' OR p.products_model LIKE '%k%' OR m.manufacturers_name LIKE '%k%' OR book_type_name LIKE '%k%') ) ) ) ]
I copy and past your SQL code into my PhpMyAdmin, added the prefix for my tables names ("zc_"), and tried it: it ran without error! (I get the result "total = 44")Quote:
Originally Posted by tekram
My query:
For your information, your query was this:Code:SELECT count( DISTINCT p.products_id ) AS total
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND (
p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR (
mtpd.metatags_keywords LIKE '%k%'
AND mtpd.metatags_keywords != ''
)
OR (
mtpd.metatags_description LIKE '%k%'
AND mtpd.metatags_description != ''
)
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_product_book_extra pbe, zc_books_to_authors bta, zc_book_authors ba, zc_book_authors_info bai
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND pbe.products_id = p.products_id
AND bta.products_id = p.products_id
AND bta.book_authors_id = ba.book_authors_id
AND ba.book_authors_id = bai.book_authors_id
AND bai.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_authors_name LIKE '%k%'
OR book_authors_nickname LIKE '%k%'
OR subtitle LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_books_to_genres btg, zc_book_genre bg, zc_book_genre_description bgd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btg.products_id = p.products_id
AND btg.book_genre_id = bg.book_genre_id
AND bg.book_genre_id = bgd.book_genre_id
AND bgd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_genre_name LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM zc_products p
LEFT JOIN zc_manufacturers m
USING ( manufacturers_id ) , zc_products_description pd, zc_categories c, zc_products_to_categories p2c
LEFT JOIN zc_meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, zc_books_to_types btt, zc_book_type bt, zc_book_type_description btd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btt.products_id = p.products_id
AND btt.book_type_id = bt.book_type_id
AND bt.book_type_id = btd.book_type_id
AND btd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_type_name LIKE '%k%'
)
)
)
)
If you diff both codes, you will see that there is no other difference that the tables names (because I added the prefixes "zc_").Code:SELECT count( DISTINCT p.products_id ) AS total
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND (
p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR (
mtpd.metatags_keywords LIKE '%k%'
AND mtpd.metatags_keywords != ''
)
OR (
mtpd.metatags_description LIKE '%k%'
AND mtpd.metatags_description != ''
)
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, product_book_extra pbe, books_to_authors bta, book_authors ba, book_authors_info bai
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND pbe.products_id = p.products_id
AND bta.products_id = p.products_id
AND bta.book_authors_id = ba.book_authors_id
AND ba.book_authors_id = bai.book_authors_id
AND bai.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_authors_name LIKE '%k%'
OR book_authors_nickname LIKE '%k%'
OR subtitle LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, books_to_genres btg, book_genre bg, book_genre_description bgd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btg.products_id = p.products_id
AND btg.book_genre_id = bg.book_genre_id
AND bg.book_genre_id = bgd.book_genre_id
AND bgd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_genre_name LIKE '%k%'
)
)
)
OR p.products_id
IN (
SELECT DISTINCT p.products_id
FROM products p
LEFT JOIN manufacturers m
USING ( manufacturers_id ) , products_description pd, categories c, products_to_categories p2c
LEFT JOIN meta_tags_products_description mtpd ON mtpd.products_id = p2c.products_id
AND mtpd.language_id =1, books_to_types btt, book_type bt, book_type_description btd
WHERE p.products_status =1
AND p.products_id = pd.products_id
AND pd.language_id =1
AND p.products_id = p2c.products_id
AND p2c.categories_id = c.categories_id
AND btt.products_id = p.products_id
AND btt.book_type_id = bt.book_type_id
AND bt.book_type_id = btd.book_type_id
AND btd.language_id =1
AND (
(
pd.products_name LIKE '%k%'
OR p.products_model LIKE '%k%'
OR m.manufacturers_name LIKE '%k%'
OR book_type_name LIKE '%k%'
)
)
)
)
My MySQL server is version 4.1.11 (4.1.11-Debian_4sarge2-log). Maybe there is something to look on this side?
Sorry, I'm not an SQL guru :-(
If anybody else could help, please!
Regards,
--
moku