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 181 to 200 of 427
28 Oct 2014, 3:31 PM
#181
redransom avatar

redransom

New Zenner

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

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

Ok more basic issues:

Missing constants being defined in english:

TEXT_AUTHOR_DEFAULT_TYPE and TEXT_AUTHOR_TYPE_IMAGE_DIR

Also, after running the update it didn't update the Authors table to include the author_image_copyright field - only making this change in the 0.9.3 version of the code.

28 Oct 2014, 4:23 PM
#182
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,

And finally I have a couple of other constants that are missing:

// Category listing items for product type bookx
define('LABEL_BOOKX_ISBN', 'ISBN: ');
define('LABEL_BOOKX_VOLUME', 'Volume %s');

These are missing from the product_bookx.php file in the lang\english\extra_definitions folder of admin.

I mentioned previously that I was wanting to be able to use the Author Type to distinguish between Authors and Illustrators so allowing the user to use the filtering to restrict based on one or the other - is this going to be an easy fix to implement?

Sorry for being so demanding!

Kinsley

28 Oct 2014, 4:38 PM
#183
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

And finally before I leave for the day.

There are various configurations not working so I had a look into the code and it appears I'm missing all of the configuration options of the BookX group.

So as an update from 0.9.1 to 0.9.4 it doesn't include these options!

Sorry for this!

Kinsley

28 Oct 2014, 5:51 PM
#184
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,

looks like I best install 0.9.1 in a testshop and see what the updater does.
Just one thing: you do realize that the updates for 0.9.2 / 0.9.3 run right after the changes for 0.9.1, there are no "break" commands in the script..?
I just mention this because you say "only making this change in the 0.9.3 version of the code". Maybe you mean something else?

I will check as soon as I can, but it is quite possible that I won't get to it before Friday this week.

Author type and filtering based on that is implemented in 0.9.4 and I am not aware of any bugs at this time.

regards,
p.

28 Oct 2014, 9:52 PM
#185
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,

Yeah I get that but what I don't understand is that if it doesn't have a break then why does it not have any of those configurations? The config group isn't there so its not even starting to create the configuration lines.

Very odd!

29 Oct 2014, 9:48 AM
#186
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,

I will most probably only get to this on Friday this week at the earliest, so I ask you to bear with me until i install a 0.9.1 testshop here and go through the upgrade process myself. But could you clarify for me what exactly you mean by "config group isn't there":
Are you looking in the database table and there is no entry for a BookX config group in the table "dbprefix_configuration_group" ?
Are you stepping through the installation script and variable "$cf_gid" is null ?
Or are you looking at the ZC Admin and there is no entry for Bookx in the menu "Configuration"?

This will help me understand a bit better what is happening.

In the meantime I recommend you resist the temptation to make any manual changes like adding defined clauses in the installation script or commenting out more code, because we will have a state of your files and your database, which will be next to impossible (for me) to troubleshoot. The plugin should really work out of the book in terms of basic functionality like upgrading etc. :)

Regards,
p.

29 Oct 2014, 9:58 AM
#187
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,

That's fine - I'd rather not be making any changes to your code - I'll go through it like you suggest but otherwise (unless I find something obvious) I will wait till Friday for your review.

Thanks,

Kinsley

29 Oct 2014, 3:36 PM
#188
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 found out that the reasons were down to missing data from a botched install of your code previously. I've taken on this job from someone else not knowing that the code failed to run successfully first time.

Apologies for wasting your time!

Kinsley

30 Oct 2014, 5:06 PM
#189
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
I'm having a issue, probably not related to the module itself , but I can't seen to get this working.

I'm using tabs to display new, featured and special in the main page.
For some reason when I make the necessary changes to the file new_products.php , all I get it's a blank in the news product tab.

The featured and special are ok, just the new product.
If I comment again the 3 alterations made in that file, everything it's ok , but of course no new bookx products comes up...
If I go to main_page=products_new the bookx products are there....

Thanks

By the way , did anyone already used the bookx modules with the ceon_uri mapping ?

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

30 Oct 2014, 8:07 PM
#190
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

I made a fresh install with 1.51 , and the template that is Responsive Avonlee Contempo Template, and the new products doesn't work...
As I just get a blank tab , I don't know were to look to try to make this work.
There's no error log...
Well , if anyone can point me some way to check for errors, or some tool to debug , or something :blink:

Thanks

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

1 Nov 2014, 2:45 PM
#191
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,

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.

1 Nov 2014, 6:58 PM
#192
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,

is your installation issue completely fixed then? I have now gotten around to install a fresh 0.9.1 on an english only ZC shop and in fact I am missing the Config entries as well. Instead of trying to figure out what went wrong I will now implement a "RESET" option which makes sure all the settings for BookX are in the DB. I have also included your comments on missing language constants, thanks for pointing that out.

I will be rolling all this into a 0.9.4revision 4 update hopefully by monday.

Regards,
p.

1 Nov 2014, 7:25 PM
#193
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

Thanks, I'll check that later, but I guess that's what I'm looking, someway to see the error.

I did manage to import the books, using csv . I already had a lot of authors in the metatags, and the author ID to product ID was the one that blast my head.
The only way I found was to use the vlookup function in libreoffice. But for some reason, libreoffice mess things up. Then I try with excel, same thing. Garbage. Then I try google spreadsheet, and imagine that, it made the job.

Anyway , they are there :)

About the filters:

Filter list: Size/Style - What are the options beside 0 or 1 ?
Filter Sidebox - Allow multiple filters active - This should allow multiple selections , right ? Or I'm getting this wrong ?

I would like to ask you, if you are planning to extend this filter to work more or less like the default zencart filter.
Ex: If I select a publisher, the filter should only display the publisher authors, collections, etc.... or if I select a genre, it would display only the authors, publishers, etc of that genre.

Thanks

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

1 Nov 2014, 7:44 PM
#194
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

@Nikerymis

I have just uploaded a version 0.9.4-revision4 to Sourceforge https://sourceforge.net/projects/zencartbookx/files/. It has an updating sorting mechanism for upcoming products, making a mix of publishing date and data available.

Let me know if this works for your shop.

Regards,
p.

1 Nov 2014, 8:49 PM
#195
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

mesnitu:

I would like to ask you, if you are planning to extend this filter to work more or less like the default zencart filter.
Dumb question , sorry for that ! The filter does exactly what I was asking !

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

1 Nov 2014, 9:08 PM
#196
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

nobody was hurt, so it's okay ;-)

1 Nov 2014, 9:23 PM
#197
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 Philou
As I was importing....or migrating products from the general product to bookx products by cvs, I probably did something wrong, because I'm getting this error when I use the sidebox to filter the publisher.
But this error appears to be looking for some imprint data. I don't have nothing yet on those tables.
Also I don't understand the Not unique "bi"
Can you guide me in this ?
Thanks

PHP Fatal error:  1066:Not unique table/alias: 'bi' :: SELECT DISTINCT bi.bookx_imprint_id, bi.imprint_name
		                          FROM product_bookx_imprints bi  LEFT JOIN product_bookx_extra be  ON be.bookx_imprint_id = bi.bookx_imprint_id  LEFT JOIN product_bookx_publishers bi ON bi.bookx_publisher_id = be.bookx_publisher_id  WHERE 1  AND  bi.bookx_publisher_id = "38"  ORDER by bi.imprint_sort_order, bi.imprint_name  in /home/daniel/lampstack/apache2/htdocs/pb/includes/classes/db/mysql/query_factory.php on line 120

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

1 Nov 2014, 9:43 PM
#198
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
I'm also having another issue, probably related to the index featured, new and special tabs of my template...
Ex: I select a genre A , it displays genre A
But if I reset the genre filter (or any other filter applied) it redirects to : index.php?main_page=index&typefilter=bookx&bookx_genre_id= ,(genres or whatever the filter is) and I get the blank modules....
If I could redirect upon the filter reset to index.php?main_page=index , it would be ok....

Thanks

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

1 Nov 2014, 9:55 PM
#199
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,

at first sight this looks like a bug / mistake in the BookX code. I can only check that out tomorrow. It almost certainly has nothing to do with how you imported you data.

Jusy to be sure, you are using the latest version 0.9.4 ?(I think there was a publisher filter bug similar to this fixed in 0.9.4 revision 2)

Regards,
P.

1 Nov 2014, 10:10 PM
#200
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

Yes, 0.9.4r3..... I've downloaded the r4 now, but only tomorrow I'll do the update.

He is reading this from the modules/page/bookx_imprints_lists/header.php , but not sure why...
I've check the extra table , witch was the only one that I didn't do nothing. I was spectating to do something , but went I look, all the data was there from the other csv imports.

ok
Thanks

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