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 101 to 120 of 427
10 Jul 2014, 12:38 PM
#101
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

Hi DML,

possibly the install URL is not correctly formed. I will make a note to myself to check the instructions on that.

Here is how it works:

Let's say your shop is called bookxshop.com and you have renamed your "admin" folder to something else like you should for security reasons, let's say "mysecureadmin" so that you log into admin with the following URL: http://bookxshop.com/mysecureadmin

After you log in, then you should get to http://bookxshop.com/mysecureadmin/index.php
Now you add the bit "?action=bookx_install" so that the entire URL reads http://bookxshop.com/mysecureadmin/index.php?action=bookx_install

Here are a couple of other scenarios:
You have not renamed your "admin" folder, so the URL would be http://bookxshop.com/admin/index.php?action=bookx_install
You are developing on your local machine and the URL to your admin page is different, so it could be http://localhost/bookxshop/mysecureadmin/index.php?action=bookx_install

even if you don't see the index.php part it should work if you put http://bookxshop.com/mysecureadmin/?action=bookx_install

Hope that works.
p.

10 Jul 2014, 6:46 PM
#102
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

I have no clue what you did differently than the original directions, but that worked. Thanks.

So, my only remaining question is... I saw in the information on the software that you should be able to change existing products to BookX, but I don't see how to do that without deleting the old products and entering them again.

Thanks again.
DML

10 Jul 2014, 7:00 PM
#103
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 DML,

if it works, that's the good news. You are right that the manual is not very wordy about the conversion of existing products. I will make a note to also be clearer on that in the instructions. In the meantime, you find the conversion here Admin -> Tools –> BookX Installation & Tools. There is some description there of how it works. To be safe ABSOLUTELY make a backup of your database before you convert the products ! ;)

Regards,
p.

10 Jul 2014, 7:12 PM
#104
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

Also, when making a product BookX, it seems to lose what I save in several of the areas. It displays things like page count, release date, price on the sale page...and the cover image, but it seems to lose the author name and book size (they turn blank inside the product build page, when I try to save changes). and it won't display the information from product name, subtitle, and book description on the sale page.

DML

10 Jul 2014, 7:34 PM
#105
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 DML,

are you using the latest version 0.9.3Beta of the plugin found on Sourceforge, yes? http://sourceforge.net/projects/zencartbookx/

Please try to be a s specific as you can, when describing what you are doing and what is not working. If it is an issue of how to call a page, you can always paste the part of the url after your "admin", so for the "preview page" it would be for example: "product.php?cPath=1_56&product_type=1&pID=455&action=new_product_preview&page=1"
Then I know exactly where you are having the problem.

Are you telling me that you don't see all the BookX info on the "preview" page between editing and saving a product? If so, please try to go ahead and save the product and see if the fields are indeed empty when you open the product again.
With "sale page" you mean the shopping cart contents or the "product info" page?

Regards,
p.

10 Jul 2014, 9:11 PM
#106
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

philou:

Are you telling me that you don't see all the BookX info on the "preview" page between editing and saving a product? If so, please try to go ahead and save the product and see if the fields are indeed empty when you open the product again.
With "sale page" you mean the shopping cart contents or the "product info" page?

Regards,
p.

Okay, I've managed to fix some of it myself, but here's what I see...

http://firebornpublishing.com/store/index.php?main_page=product_bookx_info&cPath=4&products_id=10

Now, when I look at the preview, ALL the information I've entered shows correctly, including everything entered in my description area. When the main page loads, I am missing...

Title
Subtitle
Series
and the stuff from the Description block

But Title, Subtitle, and Description show up on the preview, so I have no idea why they are not translating to the sale page, as they were before I put in BookX (for that matter...testing products that are still in General, they display fine).

No clue what is going wrong in between, but again...thanks for your help.

DML

11 Jul 2014, 10:59 AM
#107
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 DML,

just to be sure: everything you enter on the admin side like title / description etc. is being saved, so that when you navigate to another product in admin and then back to the previous one, all info you entered is there. Is that correct?

I assume all this works fine, so question is why the title is not being displayed. Have you made any changes yourself to the template file tpl_product_bookx_info_display.php which comes with the BookX distribution?
I ask, because on your website the HTML code displaying the title looks like this (with an empty title for some reason):

<!--bof Product Name-->
<h1 id="productName" class="docProduct"></h1>
<!--eof Product Name-->

The PHP code in BookX 0.9.3Beta for the product title looks like this:

<!--bof Product Name-->
<h1 id="productName" class="docProduct"><?php echo '<span class="bookxTitle">' . $products_name . '</span>'
												   . (($flag_show_product_bookx_info_volume && !empty($products_volume)) ? " <span class='bookxProdVolume'>" . sprintf(LABEL_BOOKX_VOLUME, $products_volume) . "</span>" : '') .
												   (($flag_show_product_bookx_info_volume && !empty($products_subtitle)) ? " - <span class='bookxProdSubtitle'>$products_subtitle</span>" : ''); ?></h1>
<!--eof Product Name-->

which should at least create this HTML code, even if the title variable is empty for some reason:

<!--bof Product Name-->
<h1 id="productName" class="docProduct"><span class="bookxTitle"></span></h1>
<!--eof Product Name-->

You said you are using the latest BookX version from Sourceforge. Can you verify that the PHP code in tpl_product_bookx_info_display.php looks like above? It should be around line 488.
If you have made changes to tpl_product_bookx_info_display.php, maybe you can temporarily replace it with the original file from the plugin and see if that works.

Regards,
p.

13 Jul 2014, 5:18 PM
#108
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

philou:

Hi DML,

just to be sure: everything you enter on the admin side like title / description etc. is being saved, so that when you navigate to another product in admin and then back to the previous one, all info you entered is there. Is that correct?

I assume all this works fine, so question is why the title is not being displayed. Have you made any changes yourself to the template file tpl_product_bookx_info_display.php which comes with the BookX distribution?
I ask, because on your website the HTML code displaying the title looks like this (with an empty title for some reason):
You said you are using the latest BookX version from Sourceforge. Can you verify that the PHP code in tpl_product_bookx_info_display.php looks like above? It should be around line 488.
If you have made changes to tpl_product_bookx_info_display.php, maybe you can temporarily replace it with the original file from the plugin and see if that works.

Regards,
p.

Yes, in the Admin, it is now saving everything I enter, from one time looking at the product and the next. I know the information is THERE but is not being displayed. I have made no changes to that file. The only two files I made changes to are the two you specifically tell us to make changes to in the installation directions.

This is a copy/paste of the code in that file.

Sorry it took so long to get back to you. They were working on the lines in this area, and I lost internet for a day. Thanks.

<!--bof Product Name--> <h1 id="productName" class="docProduct"><?php echo $products_name . (($flag_show_product_bookx_info_volume && !empty($products_volume)) ? " <div class='bookxProdVolume'>" . sprintf(LABEL_BOOKX_VOLUME, $products_volume) . "</div>" : '') . (($flag_show_product_bookx_info_volume && !empty($products_subtitle)) ? " - <div class='bookxProdSubtitle'>$products_subtitle</div>" : ''); ?></h1> <!--eof Product Name-->

DML

14 Jul 2014, 9:23 AM
#109
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

Dear DML,

are you 100% certain that you are using the version 0.9.3Beta from Sourceforge? ( http://sourceforge.net/projects/zencartbookx )
I have downloaded the package from there again myself just be sure there is no mistake on my end and these lines are definitely different in the file tpl_product_bookx_info_display.php that comes with 0.9.3 from there?
The version number is also written at the top of each file in the distribution, it should say:

 * @version BookX V 0.9.3 BETA
 * @version $Id: [ZC INSTALLATION]/includes/templates/[CURRENT_TEMPLATE]/templates/tpl_product_bookx_info_display.php 2014-02-05 philou 

In some earlier versions there were indeed problems with the description not showing, so I suspect that you don't have the latest one.

Is this the very first version of BookX you have installed, or did you have one previously? Please note that after 0.9.1 some template files have moved as is written in the "Changelog.rtf" in the distribution package.

Regards,
p.

16 Jul 2014, 11:17 AM
#110
desmat avatar

desmat

New Zenner

Join Date:
Sep 2009
Posts:
23
Plugin Contributions:
0

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

Thanks philou for your reply, i was travelling so the delay,

my site details are as under
site name backup.sultan-chand.com

configurations

  1. Categories, about 12
  2. All categories and products are "type books"
  3. Used Authors as authors ,
  4. One book can have many authors
  5. Used Genre as Subjects, One book has only one subject
  6. used Series is for classes, currently one book can fall only in one series
  7. used Publisher for Boards, Currently one book will fall only for one board

Problem area
Problem 1. The "text_all_music_genre"
select Anil Kr. Sharma, from authors in the book filter box, Anil Kr. Sharma writes books both for maths and mathematics Genre, so this problem occurs only if the author has books in more than one genre

Problem 2. the previous next does not work in listing
select Anita Devraj from Authors in the book filter box, 12 books wil be listed, Click on any one of them, details of the book will be listed with a previous next menu, and will always show, "Books+2" the first category and the count as 5, which is the count of the first category
and teh previous next butoon will not be activated. clicking on the product list button, will list the products under the first category "Books for +2"

Problem 3. Filter by alphabet does not work
Select any option of the filter, means, any author, any genre etc.. the books are then listed, and if you try to apply any filter of "filter result by items starting with", does not work and takes you to home page

I have been using the book version on zen cart 1.3.8 and it is working smoothly except with a few bugs. I wanted to change to Zen cart 1.5.1 and use your bookx, any help that i can provide by rigorous testing, you may let me know

You may check out the sites at backup.sultan-chand.com and teh original at sultan-chand.com
i have loaded two themes on the backup.sultan-chand.com and can give you the admin password if you want, the books are more or less the same as in sultan-chand.com

Look forward to your input

16 Jul 2014, 11:55 AM
#111
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:

Thanks philou for your reply, i was travelling so the delay,

my site details are as under
site name backup.sultan-chand.com

configurations

  1. Categories, about 12
  2. All categories and products are "type books"
  3. Used Authors as authors ,
  4. One book can have many authors
  5. Used Genre as Subjects, One book has only one subject
  6. used Series is for classes, currently one book can fall only in one series
  7. used Publisher for Boards, Currently one book will fall only for one board

Problem area
Problem 1. The "text_all_music_genre"
select Anil Kr. Sharma, from authors in the book filter box, Anil Kr. Sharma writes books both for maths and mathematics Genre, so this problem occurs only if the author has books in more than one genre
I see the problem. Currently BookX has not been written to work with other filters which are not BookX itself, like alphabethical sorting. However the problem is only superficial, because BookX and the other filters both put the filtering in the Url and currently the two Urls are not combined, the replace each other.

Example:
This gives you books by Author "Anil Sharma":
http://backup.sultan-chand.com/index.php?main_page=index&typefilter=bookx&bookx_author_id=3

Using the filter "Mathematics" writes this URL, but loses the author ("&bookx_author_id=3"), so it shows nothing since there is no longer an author selected to filter:
http://backup.sultan-chand.com/index.php?main_page=index&cPath=&typefilter=bookx&sort=20a&filter_id=10&alpha_filter_id=0

This Url gives you the desired result, combining "Anil Sharma" and "Mathematics", but the popup used for filtering is not writing it this way:
http://backup.sultan-chand.com/index.php?main_page=index&typefilter=bookx&bookx_author_id=3&sort=20a&filter_id=10&alpha_filter_id=0

I will try to fix this in the next version (this will be some weeks). In the meantime you can only remove the filtering option from your site.

The "text_all_music_genre" can be fixed very easily in the language files. You can put it into "english.php" right inside "includes/languages" or whatever language file you want to use.

define('TEXT_ALL_MUSIC_GENRE', 'Whatever you want the text to be');

Problem 2. the previous next does not work in listing
select Anita Devraj from Authors in the book filter box, 12 books wil be listed, Click on any one of them, details of the book will be listed with a previous next menu, and will always show, "Books+2" the first category and the count as 5, which is the count of the first category
and teh previous next butoon will not be activated. clicking on the product list button, will list the products under the first category "Books for +2"
Correct. I noticed this in my development here as well. It should be working in the next version of BookX. Until then you can only remove the "Previous / Next" button, so visitors have to go back to the listing to see another book.

Problem 3. Filter by alphabet does not work
Select any option of the filter, means, any author, any genre etc.. the books are then listed, and if you try to apply any filter of "filter result by items starting with", does not work and takes you to home page
In fact the answer to this is written in the answer for problem no. 1
They should bothe be fixed at the same time.

I have been using the book version on zen cart 1.3.8 and it is working smoothly except with a few bugs. I wanted to change to Zen cart 1.5.1 and use your bookx, any help that i can provide by rigorous testing, you may let me know

You may check out the sites at backup.sultan-chand.com and teh original at sultan-chand.com
i have loaded two themes on the backup.sultan-chand.com and can give you the admin password if you want, the books are more or less the same as in sultan-chand.com

Look forward to your input
No need for admin passwords for now :)
It seems that you foudn a way to show the book title and subtitle, which was your problem earlier.
I have not tested the plugin on 1.3.8. It may work, but then again it may not.

Sorry, but for the moment I can not provide better asnwers than to turn off the filters and at least you have a working website...

Regards,
p.

17 Jul 2014, 12:50 AM
#112
desmat avatar

desmat

New Zenner

Join Date:
Sep 2009
Posts:
23
Plugin Contributions:
0

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

thanks await your newer versions,
and await to offer you some cofee and dougnuts :)

the problem of text_all_musice_genre, is not only of writing the definition in the english file, but also, the list it drops , does not filter, which i presume is that filters again are not incorporated as of now, so the issue, right
anyway cheers, and once again eagerly await your newer versions and wish you luck

17 Jul 2014, 11:06 AM
#113
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

The changes should not be too difficult and I am hoping to have some time in Agust to continue work on Bookx.
I will let you know.

Regards,
p.

22 Jul 2014, 12:09 AM
#114
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

philou:

Dear DML,

are you 100% certain that you are using the version 0.9.3Beta from Sourceforge? ( http://sourceforge.net/projects/zencartbookx )
I have downloaded the package from there again myself just be sure there is no mistake on my end and these lines are definitely different in the file tpl_product_bookx_info_display.php that comes with 0.9.3 from there?

Regards,
p.

Yes, it's the first installation, but no...apparently, it's NOT 9.3. It's 9.1. Head desk. No wonder I'm having problems. So, I guess the question is... What do I have to do to change from 9.1 to 9.3?

DML

23 Jul 2014, 1:48 PM
#115
dmlyons avatar

dmlyons

New Zenner

Join Date:
Jul 2014
Location:
Boston, MA, USA
Posts:
47
Plugin Contributions:
0

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

Okay...I've updated. The ONLY problem I still see is down in the bio box and below it, where the author name should be is %s: Honestly, if that's my only issue, I can live with that bit of code, since all the other author name areas are fine. Thanks for your help.

DML

23 Jul 2014, 9:17 PM
#116
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 DML,

I'm away from my development setup just now, so I can't check. The "%s" is most certainly the leftover of a string which is supposed to show the authors name, like this: "The name of this author is %s" and then the author name is inserted instead.of placeholder %s. i can't say right now what the problem there is, so if you can live with it for about two more weeks I will check it out. But i will have to know exactly where in the page the problem is...

Regards,
P.

22 Aug 2014, 9:31 PM
#117
amdad avatar

amdad

New Zenner

Join Date:
Aug 2014
Location:
Dhaka
Posts:
9
Plugin Contributions:
0

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

Hi Philou,
I am very happy to install a great addons (New add-on "product type book" for ZC 1.5) on my website. this addon work fine on my website.
But i need to another two feature (1) how can i display list of all publisher in one page? (2) how can is display all category list in one page?
please help me
my site running on:
(1) zen cart version-1.5.1
(2) thi addon is new installed
(3) my server is linux server
(4) my php version is 5.4
(5) my operating system is windows 8

23 Aug 2014, 4:31 PM
#118
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 amdad,

I'm happy to hear you like the plugin :)
The feature "publisher list" is planned and will not take very long to implement, but it is not currently finished. I am working on the new version of BookX in these days, and if I find that the "publisher list" can easily be inserted in the current version 0.9.3beta then I will put the "publisher list" files up on sourceforge and let you know. ( If user DESMAT who posted here previously is reading this, I will do the same for you and the "filter" issue which is not implemented in 0.9.3. )

Concerning your problem (2) "display all category list in one page":
If I understand correctly, you wish to have a center page with the same content of the sidebox "category listing", showing the names of categories as a menu on the side. If this is indeed what you want then I would think there must be plugins for this functionality. The way I see it, this view would not display any information coming from the BookX plugin, since it only lists the categories as you created them in the admin backend. Therefore there is nothing the BookX plugin could do..?

Best regards,
p.

25 Aug 2014, 9:58 AM
#119
desmat avatar

desmat

New Zenner

Join Date:
Sep 2009
Posts:
23
Plugin Contributions:
0

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

philou:

Hi DML,

I'm away from my development setup just now, so I can't check. The "%s" is most certainly the leftover of a string which is supposed to show the authors name, like this: "The name of this author is %s" and then the author name is inserted instead.of placeholder %s. i can't say right now what the problem there is, so if you can live with it for about two more weeks I will check it out. But i will have to know exactly where in the page the problem is...

Regards,
P.

hi Philou
I am anxiously waiting for you implementing the filters, the plugin is working perfectly with just the hiccups of the filters

25 Aug 2014, 10:25 AM
#120
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 Desmat,

it's noted and I will move this up in priority, so you have it soon.

Regards,
p.