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 161 to 180 of 427
3 Oct 2014, 12:06 AM
#161
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Ugh, that's bad. In that case please run the publisher filter to create the error and then look inside the folder "[YOUR–ZC-INSTALLATION]/cache" if there is a new debug log. Please tell me what exactly it says in there what the error is.

p.

3 Oct 2014, 12:14 AM
#162
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Desmat:

Dear philou
Another error that i discovered

if there is only one book in a series, or author, or genre ( publisher not working so cannot comment on that ) then the book is displayed but in the breadcrumb the topmost category is displayed and the listing shows number of books in the top most category, check out http://www.passionfruit.co.in
try any of the under and you will find the error
genre >> History & Civics, Geography
series >> VI to VIII
author >> Anupam Magon

I think there is a setting in ADMIN which says to take the visitor straight to the product page if there is only one product in the listing. So that part is expected behaviour. I agree that the breadcrumb should rather show the author than the category. The "previous/next" buttons at the top of the product info page relate to the category in which the product is placed not the filtered attribute like BookX author. The only solution for the moment would be for you to:

  1. Turn off the feature to go straight to product page if there is only one product in the listing.
  2. Hide the "previous/next" buttons until they work with BookX filters, not categories (for example with CSS: display: none;)

Regards,
p.

3 Oct 2014, 8:27 AM
#163
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Desmat:

Below I list a few bugs/irritants. The purpose is for you to be aware if you are not already.

  1. Selecting any book after the filter listing, ( product info ) the breadcrumb always shows
    first category/filter 1 /filter 2 / book name

in my opinion it should show the category the book belongs not the first category in the category listing, or not show at all

  1. Keeping the same logic, as above, if there is one book , it shows
    first category / book name

so there are there are two problems, a) does not show the filter applied at all, b) like above, it shows the first category, instead of the category the book belongs to
These two issues are part of the same problem. I am aware that the breadcrumbs do not yet work well with BookX. I was no aware of the option "go directly to product page if there is only one book in the listing", so I will keep an eye open for this feature and make sure it also works when the breadcrumbs will be implemented correctly (next version).

  1. Resetting the filter takes the navigation to the home page , instead of leaviing on the same page
    Good point, should be easy to implement.
  1. Lastly if after selecting a book out of filtered list if we could just navigate previous next within the filter it would be just great
    Yes, this is not yet implemented, but planned behaviour for a next release.
20 Oct 2014, 3:57 AM
#164
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

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

Hi Philou! I'm working on testing out the latest version of this plugin (in a fancy test environment, so this isn't live). I'm using zen 1.5.1 as the base, and I'm running into some non-critical problems.

For background, on my main catalog page, I have New Releases at the top, followed by Upcoming Products and then followed by Specials. The New Releases and the Upcoming Products are where I ran into some issues.

First, after upgrading, New Releases disappeared completely. It took me a while to figure out why, but I tracked it down to a date issue. I haven't been using the "Publishing Date" in the Bookx metadata; it wasn't something I needed based on how my books are set up and displayed. When I put that "Publishing Date" in one of my recent releases, it shows up. So maybe not a real problem, but it might be something to note for new users? Alternatively you could look into check for the "Date Available" when looking for new releases if that "Publish Date" isn't there?

The Upcoming Releases issue is part date and part product quantity. The product quantity is where I have the real problem. I list our books on the website a few months in advance of their release date and make them available for preorder. So these books have a product quantity immediately, and that excludes them from the "Upcoming Releases" box.

This box also sorts by date strangely. If a book doesn't have a Publish Date set, it's listed first in Date Available order. Then books with the Publish Date set are listed after. Obviously, assigning Publish Dates to all books will resolve the sorting issue, but again, I wasn't sure if you wanted to note that anywhere or find some way to tweak it so it looked at both or one?

Other than this, I haven't run into any issues, but I haven't finished testing everything just yet. :-)

20 Oct 2014, 5:25 AM
#165
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

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

Annnd I should look through all the options before I open my mouth. I found where to switch it to include/sort by Date Available rather than Publishing Date. :-) I had checked under the product type options, but not the Catalog -> Bookx Configuration.

20 Oct 2014, 8:22 AM
#166
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Nikerymis,

I was going to check out that setting too, but you were faster :)
Does that fix your problem? Also: at the top of the Admin form to edit product details there should be a message, stating what the current status of the product is. Was that correct and complete? Or should it be extended to say something about sorting by date available or publishing date, depending on the setting?

Hoep all is working for you now and thanks for testing!

Regards,
p.

21 Oct 2014, 4:37 AM
#167
nikerymis avatar

nikerymis

New Zenner

Join Date:
Oct 2009
Location:
Ohio
Posts:
19
Plugin Contributions:
0

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

It did and didn't fix my problem. For the New Products section, turning off the "Base on Publishing Date" option makes the books reappear there. The weird thing is that I have it set to show a maximum of six (six across, so one row), but it's showing five rows of six each (probably close to if not all the recent books within the time frame I have set). I also had it dressed down to bare bones -- just the book image and the title, with links for both, and I can't find where to remove the author, price, and series details that are listed near it for the Bookx version. (I can figure out how to shut this off manually by manipulating the code, but I mention it in case you want to make those options or if I'm missing someplace else to tweak these things.)

The Upcoming Products is stranger. I set the option to 0 to shut off Base on Publishing Date, and it crops up with an error and won't load the page past where the Upcoming Products are supposed to be listed. The log is below. I don't know if this is something that I caused when I was merging files, but I can't seem to pinpoint where the problem is, as the log is over my head. All I understand is that something is wrong in the syntax. :-) I tried this with both the \includes\templates[my template]\templates\tpl_modules_upcoming_products.php that I merged with my formatting changes and then with the original from the plugin, but got the same error both times.

(Also, the product status (in stock vs. out of stock) is correct for all the book. I assume that's what you're referring to, but if I'm missing something there point me in the right direction.)

[21-Oct-2014 04:16:11 UTC] 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 'GROUP BY p.products_id  ORDER BY be.publishing_date, p.products_date_available a' at line 17 :: select p.products_id,  be.publishing_date, pd.products_description, p.products_image,
    									 CONCAT_WS(""
    											  ,pd.products_name
    											  ,IF(NULLIF(be.volume, "") IS NOT NULL, CONCAT_WS("", " <span class='bookxProdVolume'>", REPLACE("vol. %s", "%s", be.volume), "</span>"), "")
    											  ,IF(NULLIF(bed.products_subtitle, "") IS NOT NULL, CONCAT_WS("", " – <span class='bookxProdSubtitle'>", bed.products_subtitle, "</span>"), "")
    											  ) AS products_name,
    									CASE WHEN DAYOFMONTH(be.publishing_date) THEN DATE_FORMAT(be.publishing_date, "%m/%d/%Y")
    										  WHEN MONTH(be.publishing_date) THEN DATE_FORMAT(be.publishing_date, "%M %Y")
    										  ELSE YEAR(be.publishing_date)
    									 END AS formatted_publishing_date, be.size , printd.printing_description , bd.binding_description , cd.condition_description , p.products_model , GROUP_CONCAT(DISTINCT CONCAT_WS("", IF("" = IFNULL(batd.type_description,""), "", CONCAT_WS("", "<span class=\"bookxLabel\">", batd.type_description , ": </span>")), ba.author_name) ORDER BY bat.type_sort_order ASC SEPARATOR " · ") AS authors, products_date_available as date_expected, p.master_categories_id
                     from products p, products_description pd
                     LEFT JOIN product_bookx_extra be ON be.products_id = pd.products_id
    						 LEFT JOIN product_bookx_extra_description bed ON bed.products_id = pd.products_id AND bed.languages_id = "1" LEFT JOIN product_bookx_printing_description printd ON printd.bookx_printing_id = be.bookx_printing_id AND printd.languages_id = "1" LEFT JOIN product_bookx_binding_description bd ON bd.bookx_binding_id = be.bookx_binding_id AND bd.languages_id = "1" LEFT JOIN product_bookx_condition_descriptions cd ON cd.bookx_condition_id = be.bookx_condition_id AND cd.languages_id = "1" LEFT JOIN product_bookx_authors_to_products batp ON batp.products_id = be.products_id
    							 LEFT JOIN product_bookx_authors ba ON batp.bookx_author_id = ba.bookx_author_id
    							 LEFT JOIN product_bookx_author_types bat ON bat.bookx_author_type_id = batp.bookx_author_type_id  AND bat.type_sort_order < "1000"  LEFT JOIN product_bookx_author_types_description batd ON batd.bookx_author_type_id = batp.bookx_author_type_id AND batd.languages_id = "1" where p.products_id = pd.products_id
                     and p.products_status = 1
                     and pd.language_id = '1' and (p.products_date_available >20141021235959  GROUP BY p.products_id  ORDER BY be.publishing_date, p.products_date_available asc
                   limit 4 in C:\wamp\www\books3\includes\classes\db\mysql\query_factory.php on line 220
[21-Oct-2014 04:16:11 UTC] PHP Stack trace:
[21-Oct-2014 04:16:11 UTC] PHP   1. {main}() C:\wamp\www\books3\index.php:0
[21-Oct-2014 04:16:11 UTC] PHP   2. require() C:\wamp\www\books3\index.php:193
[21-Oct-2014 04:16:11 UTC] PHP   3. require() C:\wamp\www\books3\includes\templates\lt3shiny\common\tpl_main_page.php:122
[21-Oct-2014 04:16:11 UTC] PHP   4. require() C:\wamp\www\books3\includes\modules\pages\index\main_template_vars.php:433
[21-Oct-2014 04:16:11 UTC] PHP   5. include() C:\wamp\www\books3\includes\templates\lt3shiny\templates\tpl_index_default.php:81
[21-Oct-2014 04:16:11 UTC] PHP   6. queryFactory->Execute() C:\wamp\www\books3\includes\modules\lt3shiny\upcoming_products.php:63
[21-Oct-2014 04:16:11 UTC] PHP   7. queryFactory->set_error() C:\wamp\www\books3\includes\classes\db\mysql\query_factory.php:428
[21-Oct-2014 04:16:11 UTC] PHP   8. queryFactory->show_error() C:\wamp\www\books3\includes\classes\db\mysql\query_factory.php:190
[21-Oct-2014 04:16:11 UTC] PHP   9. trigger_error() C:\wamp\www\books3\includes\classes\db\mysql\query_factory.php:220
21 Oct 2014, 9:40 AM
#168
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Nikerymis,

thanks for taking the extra time to work this out for everyone –##I realize that a quick hack to make it work is often much faster then reporting a bug and resolving it :)

Anyway, at first glance there seems to be a bracket missing in the SQL statement. Since it is just after some BookX code, I would assume it is indeed a bug. I will look into this hopefully later today.

As for the date_available / publishing_date issue, I will make a few test products in my setup here and see if I can reproduce the issue. Off the top of my head I can't say if this is just a question of setting BookX options (and possibly explaining the options and their effects a bit better) or if this is also somewhat of a bug and needs to be improved.

I will let you know how I get on with it.

Regards,
p.

21 Oct 2014, 10:22 PM
#169
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Nikerymis,

here comes a list of your problems as I understand them, with (hopefully) solutions to most of them ;)

1.) Turning off the setting ADMIN -> Configuration -> Bookx: Configuration -> Upcoming Products: Base on Publication Date by setting it to "0" results in a fatal MYSQL error.
This is a bug indeed. You fix it by editing the file [YOUR_ZC_INSTALLATION] -> includes -> classes -> observers -> class.bookx_observers.php
Near line 1298 you need to replace this line:

 $expected_query = str_replace(' p.products_date_available ', ' (p.products_date_available ', $expected_query);

by these lines:

if(!empty($extra_where_condition)) {
    $expected_query = str_replace(' p.products_date_available ', ' (p.products_date_available ', $expected_query);
}

I'll try my best to include this change in a version 0.9.4revison4 in the next few days.

2.) Turning off the setting ADMIN -> Configuration -> Bookx: Configuration -> New Products: Base on Publication Date by setting it to "0" results in more products being displayed than you expected
You say that you limited the numer of displayed new products to show a maximum of six. I have turned off any BookX modifications to the New Products module and it still shows all new products in the specified timeframe (ADMIN -> configuration -> Maximum Values -> New Product Listing - Limited to ...). I have not been able to test this with a completely fresh shop installation out fo the box, but so far it looks to me that something inside ZC is not working as it should...?

3.) The New Products listing shows BookX info you don't wish to show in your shop.
You are correct, that there are no extra settings for which info to show in New or Upcoming Product Listings. BookX uses the settings made for all product listings, as found in ADMIN -> catalog -> product types -> products Bookx -> edit layout.
I simply did not want to overload the admin interface with all too many settings. Maybe this should indeed be turned into a separate setting for New and Upcoming products?
In the meantime, I would suggest to you to hide the unwanted info via CSS rather than actually going into the template code and deleting something. For this you best make a file stylesheet_bookx_overrides.css (named so it loads after stylesheet_bookx.css )and hide elements like this for example:

#whatsNew .bookxAuthors {
  display: none; 
}

4.) There are products you wish to show as upcoming, and at the same time allow customers to pre-order them. When you set the stock higher than "0" to allow ordering, BookX no longer marks the product as "upcoming".
I see your problem, however setting the stock higher than "0" on an item which is not actually stocked, means all kinds of grief for your HAL 9000 running Zen Cart. Maybe the setting ADMIN -> Configuration -> Stock -> Allow Checkout points the way to a safer solution, allowing your customers to pre-order out of stock items? Haven't fiddled much with this, so if BookX can add something to make this work, let me know.

5.) Sorting products by date is misbehaving, when products are a mix of "publishing_date" and "date_available".
I have already had some fights making these two dates work together, considering that some people may also have non-book products in theirs shops, which don't even have a publishing date.
I will look into this while working on the next release and try to improve on it.

Does that cover it?

Regards,
philou

27 Oct 2014, 1:15 PM
#170
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

Hi
First, thanks for this module, or feature for zencart and bookstore owners.
Just wanted to ask if there is a way to import via csv, just like easy populate.

Thanks !

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

27 Oct 2014, 1:48 PM
#171
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Mesnitu,

there is currently no CSV or other direkt import of products implemented. However, you could import your products for example via Easy Populate and then convert them to "BookX" product type via [ADMIN] –> Tools -> Bookx Tools. That should save you some time.

Regards,
p.

27 Oct 2014, 2:17 PM
#172
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

Hi
Yes, I've done that for testing. But with this module there are a lot of other fields...
I guess I'm asking a kind of feature request. :smile:

Thanks

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

27 Oct 2014, 2:57 PM
#173
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

mesnitu:

I guess I'm asking a kind of feature request. :smile:

That's what I thought :smile:
I see how that would be interesting /useful. However since BookX is still in beta (strictly speaking) my priority is to make everything operational first, before adding icing to the cake.

If you are a little bit technology savvy and have access to your MySQL database via PHPmyadmin or something, you could import products via easypopulate, convert to BookX, export the tables with BookX extra info like ISBN and number of pages etc. Fill in the missing information and re-import into MySQL database. But you really have to know what you are doing with this approach. I wouldn't recommend that to you, if it's the first time you're doing this…

Regards,
p.

28 Oct 2014, 11:59 AM
#174
redransom avatar

redransom

New Zenner

Join Date:
Aug 2014
Posts:
20
Plugin Contributions:
0

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

Hi Philou,

I've come back to implement version 0.9.4 on the site I was looking at a couple of months ago and I'm getting errors in trying to upgrade.

I've got version 0.9.1 on a site that a client is trialling and I need to update it but when I use the update option in admin it crashes with:

WARNING: An Error occurred, please refresh the page and try again.

I've copied in the files that are in the zip - is it going to be possible to update it or will I need to start again (which won't be good as the client has over 290 products already added in with Authors).

Thanks,

Kinsley

28 Oct 2014, 12:12 PM
#175
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Kinsley,

I sure hope you won't have to start again :-)

When this error occurs in your Admin, do you get a debug file in the folder "[YOUR_ZC_INSTALLATION]/cache" ? In there it could have detailed information about what the error is, so I can find the problem.

If not, I need to set up a store here with 0.9.1 and then try upgrading myself to 0.9.4. to try and reproduce the error.

Best regards,
p.

28 Oct 2014, 12:21 PM
#176
redransom avatar

redransom

New Zenner

Join Date:
Aug 2014
Posts:
20
Plugin Contributions:
0

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

Hi Philou,

You are dedicated I must say that - very quick response!

I had checked the cache and the logs folder and realised there was no errors in there and so checking configure.php I have realised that it was set to point to a different version of the site - so I fixed the log path and tried again and got:

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 'WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'
' at line 2 :: DELETE FROM
WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_TAGLINE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_TITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_SUBTITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_MODEL_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRICE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_AUTHOR_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_PUBLISHER_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_GENRE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_SERIES_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_IMPRINT_STATUS'
)

I'll just go and get some dinner and check out what could be causing this.

28 Oct 2014, 12:35 PM
#177
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

Hi Red,

do you have a database backup of the state before you tried to run the update the first time?
Might be a good idea to go back to that state, not knowing if possibly part of the update script ran and altered the DB in spite of the error you got the first time.

Looking at the MYSQL error (doesn't specify which table we want to delete from) it could be that you don't have this constant defined in your shop TABLE_PRODUCT_TYPE_LAYOUT_LANGUAGE. I assume you have a single language shop installation? This should be fixed in the installation script, in the meantime you could comment out this entire block of PHP around lines 435 inside [ADMIN]/includes/init_includes/init_product_type_bookx.php like so:

	    		 /* $sql = "DELETE FROM {$const['TABLE_PRODUCT_TYPE_LAYOUT_LANGUAGE']}
				    		WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_TAGLINE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_TITLE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_SUBTITLE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_MODEL_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRICE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_AUTHOR_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_PUBLISHER_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_GENRE_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_SERIES_STATUS'
				    		,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_IMPRINT_STATUS'
				    		)";
	    		$db->Execute($sql); */

make sure to also comment out the $db->Execute part.

Have nice dinner,
p.

28 Oct 2014, 1:54 PM
#178
redransom avatar

redransom

New Zenner

Join Date:
Aug 2014
Posts:
20
Plugin Contributions:
0

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

Yes it looks that way certainly - only ENGLISH currently. Is there a way to add this easily or would it be a big job?

Anyway, I restored to the test version and then commented out the language code and re-run the update.

And now I get:

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 'WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'
' at line 2 :: DELETE FROM
WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_TAGLINE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_TITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRODUCTS_SUBTITLE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_MODEL_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_PRICE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_AUTHOR_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_PUBLISHER_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_GENRE_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_SERIES_STATUS'
,'SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_IMPRINT_STATUS'
)

Many thanks,

Kinsley

28 Oct 2014, 2:37 PM
#179
philou avatar

philou

Zen Follower

Join Date:
Jan 2006
Posts:
165
Plugin Contributions:
1

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

I can fix this easily and I still have a 0.9.4revision4 upload pending with the bugfix discussed a few posts below, so it can happen very soon.

However it is very strange, that you are still getting the error. The SQL statement is missing the table name:

DELETE FROM XXX-THE_TABLE_NAME_SHOULD_BE_HERE-XXX
WHERE configuration_key IN ('SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS'

In [ADMIN]/includes/init_includes/init_product_type_bookx.php there is only that section with SHOW_PRODUCT_BOOKX_INFO_METATAGS_TITLE_STATUS etc, so if you are still getting the error, then you are also missing a constant TABLE_PRODUCT_TYPE_LAYOUT which I would expect you have even in a single-language shop?

Anyway, if you just want the quickest possible fix, then comment out the other SQL "DELETE" query just before that as well, since it is just programming hygiene happening here, deleting something that isn't used by Bookx afterall.

Let me know how you get on, so i can use your findings in a bugfix :)

regards,
p.

28 Oct 2014, 3:05 PM
#180
redransom avatar

redransom

New Zenner

Join Date:
Aug 2014
Posts:
20
Plugin Contributions:
0

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

Ok you may call me an idiot - I was updating the wrong file...

So, I've run it again and it gets a lot further (in fact it says it's successful even though there are a bunch of errors). I'll go through these issues before I come back to you in case I did manage to get it wrong again.

Also, I did add some code in case the constants weren't defined - using a simple if (defined(...)) check.