Re: New 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.
Re: New 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
Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
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.
Re: New 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
Re: New 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.
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.
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:
Code:
/* $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.
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
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:
Code:
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.
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.