Ok I have worked out the only file I need to edit to show more variables on the index pages is class.productBookListing.php
Can anyone give me any pointers how to add one of the extra variables like product genre? :wink:
Printable View
Ok I have worked out the only file I need to edit to show more variables on the index pages is class.productBookListing.php
Can anyone give me any pointers how to add one of the extra variables like product genre? :wink:
In the ZenCart Admin, select Catalog | Product Types
Select Product Type Book
Then click on Edit Layout
This will take you to a page of Layout options where you can switch things on and off.
Genre is one of the standard options
You'll also need to refer to the notes on Paul Hailey's download page for the identity of some of the MISC fields (e.g. Misc 1 = where published, Misc 2 = Condition description, misc_3 = Edition, etc.)
I should have said - not for the product_book_info page. I need extra variables to show on the product_listing pages. Thanks
I have worked out how to add more variables to the product listings page. e.g. type, subject, etc. The only file I needed to edit was class.productBookListing.php , Thanks for everyone who responded with those helpful hints :huh:
hello,
I have been using product type book for products. It's working fine.
Now the issue raise in this product type is,whether it supports meta tags?,because I am not able to define meta tags for the book products type.
And if this product type supports meta tags then how can i define it?
plz reply me. It's urgent for me.
Thanks in advance
Anyone here for help who can answer my above question about product type book
Hi, folks -
I've been struggling with writing some new code to upload 3000+ books, using both Product Type Book and Easy Populate. On a hunch I wondered if anyone else has done this yet. Have either of you got anything you'd be willing to share in this regard? I'd sure appreciate some short cuts if you can offer any.
Thanks!
I want to start out saying this mod has really worked out well in my plans to upgrade my books listing. Now on to the problem.
I originally installed the mod on a fresh zc install and it worked beautifully. No errors, nothing. I then installed it on a working copy with other mods already installed. Still no errors, but spiffycal isn't working for the book type product. I have doubled and triple checked the code and it is correct. I have no idea on where to look for the problem. Any help would be greatly appreciated.
Thanks,
Heather
Never mind. I found the problem. Image Handler wasn't playing nice with Book Product. Once I un-installed IH spiffycal worked just fine. Even worked when I re-installed IH.
Heather
I am trying to install the grid listings layout but without success.
I have uploaded all the files and applied the SQL patch but there's no change in the displays.
I'm wondering if there is a problem with the category setting to 'book only'.
Each time I edit a category, the 'Restrict to Product Type' seems to have been set back to 'Product- General', despite my having set it to Product-Book' on the previous edit.
Can anyone tell me where this setting is stored in the SQL database , so that I can check whether it is being saved correctly?
My next thought was to set the layout to columns in the Admin module (as suggested in the Readme file) but . . . I can't find this option in the Admin.
I've looked in admin | configuration | product listing
but there's no 'Layout Style' in the options.
I'm running version 1.3.8a.
Can anyone help?
Please ignore first part of my previous post.
I just worked out that I wasn't updating the 'Restrict to Product Type' option correctly (clicking on 'Save' instead of 'Add' ). :oops:
With that fixed, category listings are now appearing in grid format.
When I click ion the link to 'List all products' this remains in the original format, however, despite all my categories being books.
So, I'm still curious to locate the layout setting in the admin interface.
I just upgraded to 1.3.8 and am now having issues with the book product type. For one, it does not add the authros to the search. I can no loner search by author. Secondly, i Can not add new product types of book. when I do that, it gives me the you do not have acces to this page error even when logged in as the admin.
The first problem listed above has been solved.
Anyone else when they upgraded unableto search their books by the author name?
So, slowly reading through the posts i realized there has been significant updates to the book type since the original one made by moku. is there an easy way to upgrade to the newest version if i am still using the old moku version?
i started from scratch to build my site to get this contrib to work.
if we use the search to search by author name, should it work with this contribution?
for that matter will any of the added attributes be searched by the main search?
has anyone else got this problem - using custom product type - the items are not deducting from products_quantity ???
a follow up answer. what happened was i have physical and non physical goods. a tech note is applied to each item in the cart, and there are various custom product types. because a download was assigned as an attribute, the item was considered somehow to be downloadable, and the code is set to not deduct from inventory.
// do not decrement quantities if products_attributes_filename exists
$zco_notifier->notify('NOTIFY_ORDER_PROCESSING_STOCK_DECREMENT_BEGIN');
and specifically here - i had to change the else part of the statement. if you notice in the code, the else statement is identical so that stock gets pulled.
if ((DOWNLOAD_ENABLED != 'true') || $stock_values->fields['product_is_always_free_shipping'] == 2 || (!$stock_values->fields['products_attributes_filename']) ) {
$stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty'];
$this->products[$i]['stock_reduce'] = $this->products[$i]['qty'];
} else {
$stock_left = $stock_values->fields['products_quantity'] - $this->products[$i]['qty'];
}
i think the key here is that in my case, the item being both physical and non physical is what caused this issue. this is a strong workaround, pretty invasive. but it worked. is there a better way?
Anyone else having trouble with the search? I can not seem to search by author name. It does not seem to be able to find books by the author name.
I have the following problem:
When a normal item is deactivated in admins area and a customer visit it, coming from a search engine, he gets the message that the item isn't found and I hope (I don't know it) the search engine gets a 404 Header.
When I do the same with a book-product-type the product isn't away, when it is deactivated. Only the picture and the title and the description is hided, the special book content is shown anyway. So the search engine never gets a 404 Header.
With the older book-contribution I try to delete the link in google, but they don't accept it, because they get no 404 header and google is only a machine and not a human so you can't explain it to them.
Also when a item is deleted it in't really completly away. The message is "no picture available" and sold out. And also no 404 Header. It seems that the book-contribution not noticed the deactivation or the deletion.
Is this module not available anymore? The download site seems to be, well... down?
There is a lot of links to where the mod used to be. The latest is available here:
http://www.jphuk.co.uk/zc/index.php?...roducts_id=490
Hi
The email advices are not working for me yet again, so I don't know what posts are solved without trekking back through the list.. I moved house recently so its a bit chaotic here. And I'm slightly out of touch with book product..
However
tHis is my test site for book product in single language
http://www.jphuk.co.uk/zc138a_t1/
I seem to remember probs with authors search were possibly originally due to not having a manufacturer in the book product item.. other than that, it works om my demo site?
The prob with the 'extra' data still showing with a disabled item, I agree, it shows the 'extra' data still, -if there isn't extra data the book item correctly disappears. I will look into this, but did anyone find the code solution?
Hi
It seems to me that the music product does the same thing, shows the extra data, rather than disappearing completely when the item is disabled in admin.
http://www.jphuk.co.uk/zc138a_t1/ind...&products_id=6
The above link is my demo site with a music product, the product you see is disabled (red) in my admin, note it has no title
Would someone check this out on a 1.3.8 zencart by putting a music product in and then disabling it, , see if I'm right
I'm not saying it isn't a book product bug, but music product seems to have the same thing?
Reason I checked out music product, is that I compared the book php files code with music product files code, they have similar code in terms of what the coding does.
Let me know..
btw of course, add the artist etc extra data into the music product, for the testing..
Hello hareslade,
this is from the header.php in includes/modules/pages/
I take it from product_info and it it to product_book_info
It seems not to work full, but the extras are not shown.Code:
// if specified product_id is disabled or doesn't exist, ensure that metatags and breadcrumbs don't share inappropriate information
$sql = "select count(*) as total
from " . TABLE_PRODUCTS . " p, " .
TABLE_PRODUCTS_DESCRIPTION . " pd
where p.products_status = '1'
and p.products_id = '" . (int)$_GET['products_id'] . "'
and pd.products_id = p.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'";
$res = $db->Execute($sql);
if ( $res->fields['total'] < 1 ) {
unset($_GET['products_id']);
unset($breadcrumb->_trail[sizeof($breadcrumb->_trail)-1]['title']);
header('HTTP/1.1 404 Not Found');
HI michaelhl
The code setup you used from the standard product header isn't the same as the code in the music product file..
It looks to me like the http 404 header has been added to zencart standard product, but not for music product,
which explains the posts about search engines not liking book product, which copies the music code.
The music code probably doesn't allow a 404 header to be written, (where the ordinary product does allow), because the 404 standard product code instructions are in the header, not in main_template_vars.php. You can't write a header after any html is output.
Technically the separate problem seen with extras data showing, is because the main_template_vars_product_type.php in both music and book product, is running when it shouldn't, i.e its getting 'extras' data.
main_template_vars.php switches to the 'noproduct' template when there is no product found to display (i.e when it detects the red 'disabled' setting for the product is present). But I don't yet understand why the extras data are apparently showing on the 'info' template - it should have switched to the noproduct template.
Has anyone tested the music product for the same extras data problem when disabled, yet, as I suggest?
If it turns out music product is faulty, then really a post should be put in a new main thread, asking for solutions for music product.
Hey Hareslade,
Have you had any difficulties with your Zen Cart or mod when a shop has upwards 2,000 products?
I'm in a bit of a bind, which is detailed here: http://www.zen-cart.com/forum/showth...865#post604865
You don't need to read my entire problem, but I am curious about where I can go for answers in fixing the Zen Cart.
the ocarina
There must be a processing time, or other limit somewhere on every sql request, you found it..
Either Hostgator has a type of sql processing limit which other hosts may not have,
or
the book sql might be proving too unwieldy because of the number of products
Or if you're showing 'product count' in categories menu links on the pages, turn that off it reduces sql requests.
Theres also a zencart global debug setting I think, that can show the sql process time period used, at bottom of each page, once you see it, if it says more than say 6 seconds its having trouble
I think all hosts limit the sql 'power' available per hosted site, as they are normally on servers with say 50 websites, and if one takes all the sql time up, the other sites will grind to a halt.
generally... is anyone going to test the music product to see if it behaves the same as book product regarding the 'extra data' see several posts back?
Without confirmation I'm unable to post in the main forum regarding music product..
(The book product still shows up on its original url, even if the product has been disabled in admin.. does music product do exactly the same ?)
hi
the link to download doesn't work. is there any other place where we can find the zip file?
oops; in between I found it:
http://www.jphuk.co.uk/zc/index.php?...roducts_id=490
Hi
Depends which version zip you need 1.3.8 or 1.3.7
See left hand 'zencart matters' menu, at
http://www.jphuk.co.uk/zc/index.php as in my signature below
If the download doesn't work (but it should) try a different browser
how can I enable display or activation of url for authors, when I click on author in a product page, it does do the filter action than going to th eauthor url.
the same question for displaying the text of description of format, conditions, etc.
not sure quite what you mean in your post reza,
maybe p.m me with a page url as info, and description of the situation
there are a lot of display settings in the admin for book, in the 'product type' edit page
Can anyone out there help me make adjustments to the default product type please on a standard install of V1.3.8 for a bookshop?
What I'm hoping for is to eliminate the need to add a new product type by just rejigging the default one to suit my needs. I figure that if I can change music genre to subject and recording artist to author then I will have the main changes I need. I have worked out how to change the wording in the language file so that music genre appears as subject but I can't work out what language file I need to change so that recording artist appears on the product page as author.
Also I want to show format (std, trade etc) and new or used description of books on the main product page. How can I easily achieve this? By adding these fields to the database or by working through attributes?
Can't make sense of the bookshop mod. Downloaded it but couldn't work out what I needed to upload. I am sure it is excellent but to some one like me it is totally confusing.
Thanks. I'm a newbie by the way:smile:
Hi bookwise, maybe you need to get more zencartwise before attempting mods
i.e like what we have to do, work out slowly, where the files are that do various things
the book product isn't too bad, you may get through a few zencart test sites first if you're new to installing add-ons
Adding fields for new/used and so on is a programming chore, thats why book type exists!
In the book zip pack is a folder 1_BOOK_MAIN_FILES
Within that is folder 'catalogue', thats the one to upload the *contents* of, into the zencart main folder.
You also need to alter the database tables by using from folder RUN_THIS_FULL_INSTALL_SQL_PATCH_FOR_DATABASE
file ADMIN_PATCH_SQL_EXTENDED_BOOK_TYPE_V4.txt inside zencart in the admin 'sql patch' page
BUT i suggest first, you get the 'database backup' add on from the add ons list, make sure you have
a database backup BEFORE you apply the book sql patch. Just in case summat goes wrong..
All this is told in the readme file README_main_book_install.txt in folder 1_BOOK_MAIN_FILES.... thats where the info is..
wel, when you see a product in product info display page, when you click on authors, it goes to show all bookd from this author (so, filter function), while in admin we can put a url (inetrnal, or external url) or this author, I don't find any place on the front page of site where I can find the url link to authors' url.
I hope this is now clear, the best example, see our demo site and click on the authors of a book.
is thre any way to make or have more defined search functions: example:
http://roshanbh.com.np/2008/01/popul...x-and-php.html
in actual situation, when I click on authors filter, it gives me a long list of authors, so actually the customer remains within so much data even if for us we did a filter of many data.
summarized: we know that one author can have some subjects, and each subject can have some types, , then using the link above , I suppose we should have the possibility to define more specific search options for book products withou loading many times by filtering this options (authors, subjects, types, ) individually.
another intressant link here wich should be better for us due to use dirctly from mysql:
http://php-ajax-code.##########################/20...es-cities.html
(advantage: used mysal, so very good for us to use bok tables)
---------------
http://www.opencrypt.com/blog.php?a=22
also good, still in progress, but it used also mysql, )
--------------------------
oops: also this one which is more flexible and more robotic
http://www.opencrypt.com/blog.php?a=23
I added this line to tpl_advanced_search_default.php
after manufacturer field:
<fieldset class="floatingBox forward">
<legend><?php echo ENTRY_MANUFACTURERS; ?></legend>
<?php echo zen_draw_pull_down_menu('manufacturers_id', zen_get_manufacturers(array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS))), $sData['manufacturers_id']); ?>
<br class="clearBoth" />
</fieldset>
//this is what I added after above lines bof: adding extra filed to search function: authors list
<fieldset class="floatingBox forward">
<legend><?php echo ENTRY_MANUFACTURERS; ?></legend>
<?php echo zen_draw_pull_down_menu('book_authors_id', zen_get_book_authors(array(array('id' => '', 'text' => MAX_BOOK_AUTHORS_LIST))), $sData['book_authors_id']); ?>
<br class="clearBoth" />
</fieldset>
//eof
but the filed of authors doesn't been displayed.
Is this not a good way to get more search definitions for advanced search for book products?
for echo entry manufacturers, I didn't know where I should put definition to come from it to here. anayway, the important is that we get authors, and other options of a book in the search functiionality to decrease the number of results and more customer friendly result page.
a result page with more than 50 articles is never intressant for a customer.
Hi reza
Well I expect you'll find a way of altering the search function, under certain conditions there is a dropdown for products lists , an 'A B C D ' filter, it sounds like you need that sort of thing somewhere for authors..
I'm not able really to make specific suggestions, it'd take a long time for me to sort it out ..maybe on zencart 1.4 when we all have to totally rewrite our add-ons coding :)
thanks hareslade
and what about the authors url link,
remember this question above:
"wel, when you see a product in product info display page, when you click on authors, it goes to show all books from this author (so, filter function), while in admin we can put a url (inetrnal, or external url) for this author, I don't find any place on the front page of site where I can find the url link to authors' url."
oops, I AM SO SORRY. I found it now, actually the url and image of authors are displayed in apart sidebox
I think just the readme and how to use of book product should be enhanced, especially for some peoples like me will be very necessry, also i don't know for what can I use misc , misc-bool, and misc_int_5_1 on product Info,
Thats ok reza
For those wondering what we're on about, see my demo page
http://www.jphuk.co.uk/zc138a_t1/ind...&products_id=5
When an author has data, and when a book is displayed, there's an optional sidebox showing the author(s)... the author's site url is not separate, its a hyperlink attached to the authors name and nickname in the sidebox..
You're quite welcome to write up a user manual reza..
Regarding the 'spare' fields... thats what they are...spare.. if the textual 'defines' labels for those fields are changed to your choice e.g 'paper quality' then you can put in your own book data entries.. in other words, you choose what you use them for.
Some fields are set up as preset dropdowns, so you can run a preselected set of options in admin to choose from. Other spare fields are just text-input fields. These fields were added in when I did the coding, because to add just one field from scratch is a lot of work, (in various php files) but doing say 10 extra is just adding extra process to the job already being done.
Many of these extra fields can be made 'private' so they only show on the admin pages for books. This was vaguely an attempt to make a flexible product type so that a user can tailor the data to their own needs. A programmer can also change the book type to their own choice, you don't have to always use it for books.
See down the page at
http://www.jphuk.co.uk/zc/index.php?...roducts_id=490 it tells you about the fields
The 'defines' for the text displayed 'label' on the book product for a field, (and for the field label in admin) are kept in specific php files. You need to go through the uploaded book files to find them.
There are in fact a few word docs and other 'readme' type files if you go through the zip file folders. But what there isn't, is a global 'users doc', mainly because its a job making one. And then they'll change zencart version so it all has to be re-written..
I installed the latest book type and need to retrofit it to chemicals, not books. Am trying to use all the misc fields.
Questions:
can I change the mysql datatypes on the misc integer fields to be text fields? Will this mess up anything else?
In product types I checked misc int5_3 to display - it does in the admin and writes to the file, but not in the product listing, where I also need it to be so customers can see it. I will need all the fields to display (I might even need to add some, which is another issue I'd love advice on), but don't know why this field isn't displaying.
thank you very much for any help
Figured out the above problem of misc int 5_3 not displaying in case anyone else has this issue:
in approximately line 628 in tpl_prod_book_info_display.php the if statement tests for 0 when it should test for '' (empty string)
(since I changed the field type of misc int 5_3 from int to text)
here is the line:
echo (($flag_show_product_book_info_misc_int_5_3 == 1 and $products_book_misc_int_5_3 != '') ?
So since the test failed, even tho there was text data in the field, it wasn't displaying.
Possibly changing field types is not the best way to do this but I'm trying to create a new product type using all the fields.
J
Does anyone know where the download is for this product? The page that the current download link goes to is dead and has been every time I check. And, by the way, I've checked with multiple browsers on both Win and Mac platforms.
I very gently advise all newcomers the book download for 1.3.8 is at
http://www.jphuk.co.uk/zc/index.php?...roducts_id=490
I put the general site link in my signature, see below
Although I've done a lot of work on book and currently look after the zip, I'm chicken about putting it as a zencart add on, you'll have to badger me, or tell me just how I get it there..
If we are using the search box provided by Zen cart, should we be able to search by an author name? I can not see to be able to do that.
so i checked on your site and it does seem like you can search by author name. I have the latest ZC installed. Any ideas?
tekram
so many reasons might stop it
check the product type settings for search
i think it may only find authors with books active i.e enabled, on the site
there used to be an issue with manufacturer, try adding manufacturer i.e publisher to the books
oh, maybe you need to use the authors search sidebox, enable it in the sideboxes list?
i would prefer there would be one search box that could do all of the searches.
do you think the availability date matters? i can only set the date the book is available is tomorrow. i have no real catalog now except for three books. maybe the search result for setting the book date to tomorrow will work when the date has arrived. if i set any other date and then go back after saving it, it comes out blank.
the availabilty date does not seem to be the problem.
i can find books by title and things in the descpritoin. but noy by subtite, author, author nickname..
Would someone please let me know if the book type product works with Easy Populate?
It does not seem like easy populate completely works with this plugin.
http://www.zen-cart.com/forum/showth...=35389&page=40
Anyone able to get search to work? That is, if you use the search that comes with zen cart, can you do searches by author name? it seems like i maybe doing something strange because it used to work with the old plugin. i am using the latest version of both zen cart and the plugin. and to make sure, that is all i have installed for the time being.
thanks for that .. I think the 1.3.8 book version needs fixing, for finding authors in main search
Is this still available?
yes it is check it out at http://www.jphuk.co.uk/zc/index.php?...roducts_id=490
I may be missing some files (or possibly brain cells). In the read me it says:
In the files I downloaded I can't find "catalogue" or the sql patch. There is a folder called "1_Book_Main_Files" but there is nothing in it. There are a lot of other folders but most of it looks like extra stuff.Quote:
just upload the files in \catalogue to your cart,
apply the sql patch in folder RUN_THIS_FULL_INSTALL_SQL_PATCH_FOR_DATABASE
to your admin sql patch page in zencart.
Not sure what to install. If anyone could point me in the right direction I would greatly appreciate it!
Hi thebasher
I just dl'd the book v138 zip myself to check, go to actually inside Folder 1_Book_Main_Files/catalogue/..
Inside /catalog is 3 folders /admin, /images, /includes,
Inside those are files, and more sub folders-with-files-in
Upload **contents*** of /catalogue to your zencart site folder, zencart already has those 3 folder names..
I'll alter the readme file maybe
***Alongside*** the /catalogue folder see if you can see a QUIETLY named folder RUN_THIS_FULL_INSTALL_SQL_PATCH_FOR_DATABASE the required sql patch is inside that
Its ok, I get brain probs too.... are you ok now
Sometimes its better to reserve a fresh test zencart site for first attempts, in case it all goes terribly wrong
==============
v138: MAIN ZENCART SEARCH BOX, BOOK AUTHORS FIX
Due to popular request (that is, people keep asking me why it doesn't work)
I fixed the book file that does the authors search from the main zencart search box. Overlay this file on the already installed book one, for v138 zencart only. Its a minor change, due to changes in v138 that I didn't notice.
The DL on my site is a zip, get the file in the zip, put it in (site)/includes/classes/observers/
OR if about to upload the whole book fileset, replace the existing file in the fileset before uploading.
The 'fix' zip is at
http://www.jphuk.co.uk/zc125/downloa...BookSearch.zip
let me know if any probs with this fix, it should work ok in getting the missing book data when a search for a specific author (or part) is done. Then you'll get the correct books shown in the resulting search list.
I figured out why I couldn't see the contents of the main files folder. For some reasons my permissions were set to custom and not read/right. I downloaded it again just to make sure I have the right files and it all looks good.
Thanks for getting back to me. My head feels a little better now!:flex:
I was able to get everything installed. Edited the layout created author, subject, etc.
But when I go to create a new product with the product book type I get this error message:
Am I missing a file?Quote:
Warning: main(includes/modules/product_book/collect_info.php): failed to open stream: No such file or directory in /home/content/b/a/s/basherbeatz/html/7beats9/product_book.php on line 129
Warning: main(includes/modules/product_book/collect_info.php): failed to open stream: No such file or directory in /home/content/b/a/s/basherbeatz/html/7beats9/product_book.php on line 129
Fatal error: main(): Failed opening required 'includes/modules/product_book/collect_info.php' (include_path='.:/usr/local/lib/php') in /home/content/b/a/s/basherbeatz/html/7beats9/product_book.php on line 129
Dumba@! I had product_book & product_book_info in the wrong folders. :oops:
Got that fixed and all is wonderful! Yee Haw!
Hi thebasher
Judging from your website, (zencart?) you are a very cool dude (is that what we say)
So don't worry about brain probs, it comes with the job...What I usually find is, I post a prob on the forum, then I find the answer 5 minutes later...
Thank you. I've had a few of those moments in the last couple of days.
I'm having an issue with additional images not opening up in a new window. They open in the same page.
I have lightbox installed and that isn't working on the product book type category but I'm not too worried about that as long as they open in a new window.
Do I need to make any changes to the code to get them to open in a new window?
Thanks for all your help.
I seem to be running into a problem on the product page. I have the author enabled under admin but the author name does not show. any ideas?
When entering new products, make sure you select "Product - Book" (from the drop down next to the New Product button) before hitting the button. Otherwise you will be entering the product info into the "Product - General" section. If you do that, the author won't show. Just a thought.
I'm using hareslade's mod which works fine. I just want to make one small change to the product listings section. Currently all items are listed as such:
Title
Brief Description
by Author's name
ISBN
I wish to change the order thus:
Title
by Author's Name
Brief Description.
I think the following looks better:
How To Win Friends and Influence People
by Dale Carnegie
Followed by the brief description which would
go here.
I've tried fooling with the observer Class but can only move the Author above or beside the title, not under. All help will be appreciated.
hareslade if you read this post, thanks for your great contribution.
John
hareslade is still around, one of you guys really should pull the short straw for the future, because when zencart 1.4 etc comes out, it'll be a long job upgrading this book product, I may not be able to spend the time on it.
But.. johnk.. if you look in product_listing.php around line 113 you'll find
thats where the observer class sticks it's oar in just for a book, in the display list.Code:$zco_notifier->notify('MY_NOTIFY_GOT_PRODUCT_LIST_NAME');
A few lines above, there are two entries with
The observer class for listings is in class.productBookListing.php ...you find that same bit of code in there.Code:<!--jph_notify_subtitle-->
The observer detects that bit of html and inserts whatever it decides to, replacing that code with the extra html to change things
also it uses the
From that you may be able to see how it all works, the original string html that the listing file would have made for a product, is changed by the observer class, just for a book product.Code:<h3 class="itemTitle">
Change php things slowly in the observer class, so you see the various bits doing whatever they do.
You can put extra code 'bits' like the jph_notify_subtitle html, into the product listing file, then alter the observer class to replace that exact bit with the html you want to display.
The trick is, the jph_notify_subtitle is surrounded by the arrows so the non-book products html still carries that 'tag' but doesn't display it, its present in the page's view source.. check it out..
Does that help?
Hi hareslade, sorry for the delay but I never received an email when you responded. Maybe I need to update my email address. I had already figured out most of the class stuff, but I could only get the Author above the title or below the description. Not much has changed except that I've decided on another presentation which actually suits my project better. I really don't need a full book catalogue for this job because it has nothing to do with books at all. What I did want, was info about each contributor (author) and the contributor's name shown in the listing and info pages under the product title. As I'm using ZC as a catalogue and not a shopping cart, there will be no need for me to take this project to version 4. I strongly believe however, that ZC would be far more popular if it included a few mods like the one created by Moku and yourself. Provided they were professional, the ZC team could easily charge $50 for each mod to help finance the free Core program.
Thanks for your help and I'll keep playing with it until I get it right. BTW I couldn't find '<!--jph_notify_subtitle--> in product_listing.php. Maybe you were refering to an older (or newer) version because the other line was at 103 not 113.
Thanks for your help and best wishes.
John
Thats ok, I don't get emails either sometimes from here either
Maybe the html isn't in the previous version, I was looking at V4 files for 1.3.8. and I think I added new stuff in for it.
The product listing file is the one I always find myself modding, maybe future zc versions will split out some of the processes into separate files, so the product listing display itself, is easier to understand and modify.
My reading of zencart is, it maintains its status partly by having excellent back end admin.. ideal for selling with..
The add-ons for zc are not as straightforward as some with other open source, zc could do with an easy module install/uninstall system, - but zc has other amazing attributes instead. Without an instant install/uninstall it means 3rd party add-on-makers have probs in charging for add-ons, cos using zc add ons is clunky. Its not a 1:1 comparison in any way, but I use joomla a lot and there are masses of little add on suppliers who offer cheap (and not so cheap) modules.
On the other hand, I think there's a background tradition here, that zc add-ons should remain free if possible..
Hi Hareslade
Thanks for your comments.
I thought odd that ZC included record companies/music etc, but not books. being involved with books over the years, I know that there is a huge demand for a powerful book eStore script. I'm not suggesting that ZC becomes a books only eStore, but there is an openig there for the programmers to offset some of their costs by offering these "special modules". It's no worse than offering the manual as a commercial product which they charge $40 or so for. They've managed to make the template system so complex that 3rd parties are charging (and probably getting) hundreds of dollars. In fact, my guess is that the ZC 3rd party after-market is probably worth $millions, but how much does ZC see of that I wonder. I've been around a long time, in fact it was me who convinced Harold Ponce de Leon to make osCommerce both an eStore and a Catalogue. Harold was a bit surprised that someone would want or need a powerful catalogue, but he went ahead and included the mod for me. That mod is now well and truely part of the ZC core and that's what I use for several projects. I'm not the only one. I've seen it used on dozens of web sites over the years. My sites aren't live yet (I ditched all the old ones) but I'll send you a URL when they go on air.
Everything is looking great and I appreciate your help. There's just one little thing I'm now stuck with and maybe you can point me in the right direction:
It comes back to the Product lisiting, but the problem isn't anything you have introduced. The product description is flush with the image and it looks untidy. I've looked at all the files I think are responsible and can't find a sloution. When I look at the source code, the offending table for the image(s) has a cellpadding of "0". I need to make it "4" as in the example below to give the description some air. The thing is, I can't find the file that generates this HTML anywhere. I'm sorry, but I was bought up with dbase II and Clarion, both of which used "includes" that were so easy to follow. Any clues?
Here's the source chunk with the change I need:
<table width="100%" border="0" cellspacing="0" cellpadding="4" id="cat10_25Table" class="tabTable">
<tr class="productListing-rowheading">
<th class="productListing-heading" align="center" scope="col" id="listCell0-0">Image</th>
<th class="productListing-heading" scope="col" id="listCell0-1"><a href="etc
Regards,
John
HI johnk
I agree ..dot dot..
The prob is, pro book software users get spoilt with loads of fields and bespoke setups. the add-on here was as close as I had the patience to do it on top of Moku's version, but still has limitations. I think I'll wait to see if zc 1.4 (etc) is able to take this book add-on without completely revamping it .. but practicality says, I haven't got time to do a complete add-on again, my life's changed a bit.. and I have a feeling 1.4 on will be mostly different from 1.3.8, they've been slaving away a year now?
The 'table' line you're looking for is in the guts of zc proper, 'I think'
look in 'your template'/common/ folder for tpl_tabular_display.php line 19 in the standard zc 1.3.8a fileset
I suggest you actually get the one you're using off the site, if it doesn't appear in the current template set then it is got by default from the default template. If its only present in default template, copy it back to your current template folder after mods, it then over-rides the default one.
Maybe you could also apply css, there's class tabTable of course, and class productListing-rowheading is at top of the product listing file, so that is I assume unique to product listings displays.
Thats what I mean about the product listing file, it takes aeons to see which bit does what, or even if it's in there..
Hi Hareslade
Thanks so much for that. It took less than a minute to copy the file and make the change. I must have spent a couple of hours looking before calling on you. A schematic would go down well - what file calls what to do something. I would never have found that file and I don't know why osC and ZC have taken the path of spreading stuff all over the place like a train wreck. I can't believe it saves a nanosecond of server time when dozens of files have to be read to create a listing. Anyway that little tweak really put a nice final finish to the project.
I'll be in touch with the URL when the site goes live.
Best wishes from OZ, it's 3am, 26 degrees C as I speak and quite humid, plus it's time for bed.
John
I did a dreamweaver search to get your table line, although I did remember ... if its a display, the slash common folder has the next level up often. There is a search in zc admin, not used it myself though. Yes pm me a url later, unless you want it public..
hareslade ,
Thank you for the development of new product type_book.
I have downloaded the file but have difficulties in installation.
I am very new to the PHP stuff...:blush:
Can you tell us where to extrac those files and how to use ?
thank you!
hareslade;
I just found a read me file in your .zip file.
Can you please answer 2 questions :
1. "just upload the files in \catalogue to your cart"
I can find the folders in /catalogue , but I am not sure where I need to put this file.
you said " to your cart" if my cart location is d:\server\xampp\store, I just released
those files to d:\server\xampp\store?
2. "apply the sql patch in folder RUN_THIS_FULL_INSTALL_SQL_PATCH_FOR_DATABASE
to your admin sql patch page in zencart. "
Still , i am not familiar with php so I don't know how to do that. can you give a more detailed instructions?
thank you!
Hi
1 -yes
look at the folders and files structure you are uploading, there will mostly already be similarly named folders branching off the \store folder in your case so all you do is upload the lot inside \catalogue into \store
A month or so back someone else asked similar, go back through the thread here
RE. 2... applying sql is done inside zencart, there is a page in admin for it
DO take a database backup BEFORE applying the book sql, just in case of accidents
What sql patch for book does, is add extra tables to the database plus other specific entries.
There is a 3rd party zencart add on for doing complete database backup, you'll have to search for it
OR you can get 'phpmyadmin' OR you can usually do a db backup from your cpanel, using phpmyadmin -assuming its a linux webserver.
The best way to get more info is to trawl the zencart site or forum, for general info, just try to get similar posts about similar things related to what you are doing
Maybe have a practice test site, rather than possibly mess up your special one :)
Most of us learn by practice
hareslade,
Thank you very much , yesterday I managed to add the book product type. However I find another question related
to the book template.....
In admin page:
If you go "product type" and you choose "Procuct general" and then you click "Edit Layout" button , you can see there is an option : "PRODUCT Attribute Price Prefix - Default". this option is
very important if you want to add some attribute price for
the product. For example , besides the base product price,
customer can choose " Size : extra big +7.00"
However, If I choose "Procuct - book" , then I can not find the
"PRODUCT Attribute Price Prefix - Default" option!
what happend is if I price one attribute of a product,
the sceen will show sth like "YesATTRIBUTES_PRICE_DELIMITER_PREFIX+$7.00ATTRIBUTES_PRICE_DELIMITER_SUFFIX " , they suppose
to show "+7.00" only.
Without this options I have trouble adding attributes price neatly for book products, could you point me a direction about how to solve the problem?
ATTRIBUTES_PRICE_DELIMITER_PREFIX
ATTRIBUTES_PRICE_DELIMITER_SUFFIX
"PRODUCT Attribute Price Prefix - Default" option has been left out of the admin setup list by the looks of it,
but a quick fix might be to define them in a 'defines' file instead
try inserting these 2 entries below, into \languages\english\extra_definitions\product_book.php which is one of the defines files for the book product, the file is in the book fileset. These 2 were copied from the entries for other zc product types, and you can change the second part of each define entry
, ' )'); displays a )
, 'xyz'); displays xyz
If you've not altered a php file before, a php file hasCode:define('ATTRIBUTES_PRICE_DELIMITER_SUFFIX', ' )');
define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', ' ( ');
You insert any extra entries anywhere between those beginning and end linesCode:<?php
contents
?>
don't use notepad or wordpad for editing - google for
'php file edit software'
or get hold of dreamweaver
can't guarantee the fix, haven't got time to try it just now
Yes!
I just followed your instruction and the problem was solved. Even there is no option for "PRODUCT Attribute Price Prefix - Default" ,
but this problem is gone, now my extra attribute price looks neat! now it looks , for example, ( +$5.00) and this is what I want!
Thank you very much Hareslade !
I'm reading thru this thread but was hoping someone might be able to save me some time (been at work on this and my other sites for a week and the mind is going:wacko:).
I actually have 2 sites that I'm hoping to use this on, but I need to know if it DOES or DOESN'T work with Easy Populate?
So far, I seem to have read a bit of both.
IF it does work, can someone tell me which should be installed first? This add-on OR the Easy Populate add-on?
I have EP installed already, but can reinstall a copy of my site prior to that install if it works better to do this one first.
Also, since one of the my 5 sites is for comics, is it easy enough to change fields, like the Author for example, to another name (Volume, Publish Date, Series #...)? OR can you turn off that field and use one of the custom fields for those ?
If anyone can offer any info on these questions it would be greatly appreciated by me and my family who don't seem to recognize me anymore unless I'm sitting infront of the computer scratching my head :unsure:
Thanks so much!
PLEASE HELP!
I installed following instructions and when I go to apply the sql patch I receive :
Error
SQL query:
# DEFAULT CHARSET=latin1;
#-- --------------------------------------------------------
#-- DEFAULTS
#-- --------------------------------------------------------
#-- -------------
#-- Product Type:
#-- -------------
DELETE FROM product_types WHERE type_handler = 'product_book';
MySQL said: http://lilleypadcove.com:2082/3rdpar...img/b_help.png
#1146 - Table 'jnothing_zc1.product_types' doesn't exist
what did I do wrong??? :cry:
Hi Lilley etc
I don't think easy populate is compatible because it can't create the extra book data required
Its a technical prob, to do with the difference between creating a book in admin, and trying to do it 'remotely'
Various people have had a go at easypopulate, they may reply if they see this
----
sql complaining about 'jnothing_zc1.product_types' I assume your prefix (for all tables) is 'jnothing_zc1'
Its possibly saying the product_types table is missing, which is strange as its a zencart core table
Suggest you use your cpanel to check out the database tables prefixes, that means using phpmyadmin
Check what prefix they actually have, if its not 'jnothing_zc1' then you have a prob
Maybe you have several separate zc test sites, with different databases / table prefixes and they got mixed up during using backups . Not quite sure I understand any more than you do :) but I have an excuse because I've been working on joomla lately.
---
Regarding changing field display text labels yes that can be done by changing defines
for instance search the book fileset for 'Author', it'll be defined in /languages/english /somewhere
However, sometimes a particular field has a specifically set up display, for instance Authors are a special case, as you'll see from the way several authors can exist for a book and there is a special sidebox etc for searches,.
If you get to know the book filest and dabble in understanding basic php, find the display template via /includes/templates/(classic)/tpl_product_book_info_display.php thats where the fields are displayed
You can turn them on and off in admin as a lay person, use admin's product types, book, edit layout. There are lots of switches there.
zencart mods do tend to get you sat at the computer :) theres quite a lot of book setup info in the book fileset readme's
Thanks so much for replying.
Your first sentence says it all tho :cry: ... if it won't work with Easy Populate, then it won't work for me.
I have over 30,000 comics (just product for this store only!) and I enter them into a online database (ComicBookRealm.com) so that I can check cover pics to see that I have the correct book and info. I'm not a collector or know that much about comics, tho I have learned some stuff in the past few years since I obtained this large lot, but this gives me a way to check that all of my info is correct. My plan to make life so much easier was to download the exported file from there with all of the info and make a few changes to order and such to match up to the EP file and in one tap of a key, have a pile/box of 100+ books added with their correct info and all we have to do is scan and upload the pictures. Was supposed to be the easiest of my 5-7 stores :lookaroun.
I guess I will just have to figure out a way to get the info needed to match up to the Description field in EP and upload it from there. Guess I will have to get personal with Excel ...lol.. and see what it has to offer as far as the easiest way to get info from several fields merged into one field. I'm sure something is possible...was just hoping for the easiest.
I'm open to suggestions if anyone has anything to offer.
Thanks so much!
Lalla
P.S. I still might be able to use this for my Romance Novel store that I'm moving over to Zen from osC. Probably won't be using EP there because that is the site my Mom will be focusing on....have about the same amount of books, but at 81 she doesn't need the hassle EP can cause :wacko:.
Thanks again!:D
Yeah you'll have to do it data-manually per book in zc admin probably
To be precise, EP can only upload title and other 'normal' fields as in an ordinary zc product, so you might if lucky, be able to upload just title, description, manufacturer (publisher) and price etc, but the extra data tables that book uses such as author, and publish dates etc .......those tables' data needs inserting by hand in zc admin so to speak.
To make EP work for books is so far defeating everyone, because the extra book data needs to know the new book's zencart i.d , and EP can't do two-stage partial uploads for each book. In other words, it doesn't know what i.d zencart will give the next book, so it can't generate the extra data.
I found EP rather unfriendly, it refuses to say why things don't work.. thats the limitation of a browser file upload system.
I'd really like to see EP converted for book data upload, or a bespoke php solution ...fraid its too big a job for me just now, but someone might go nuts and spend a month or 6 developing it (offers, anyone?)
If I'm not mistaken, osC has found a way to allow for both, but the whole package of creation there is harder then Zen so I don't even want to think about it. It might help someone in the future to check into it tho...especially if they are familuar with how both osC and Zen work and their differences.
I, however, don't have that kinda time or mind to even attempt it:smile:.
I've posted about excel and maybe someone will be able to help me there with just merging some info together and having it show in the fields that work with EP.
Thanks so much again!
Lalla
Ok, got the EP to work with a edited Excel file and was able to use a text editor to find tricks to get info merged together in the places that I needed it merged (since I can't make additional fields).
But
Can I still use the part of this add-on to create the Combined Search box ?
Or is that out for same reasons the rest of the add-on is out?
Thanks!
Ok, just reread the install file and it says that this is to add the Combined Search box for those fields added with this add-on... which I can not use because I really need Easy Populate to work ... so is there another thread that explains how to do that with in other ways?
Well, I'm back:blink:.
I have installed this on another of my sites for romance novels but I can't seem to figure out the fields and get them to work correctly.
For example, under Author, I can NOT stop and add a author everytime I add a book, so I normally use the first letter of the author's last name. This isn't working. Should I be putting that under Subtitle (By Nora Roberts) and then use the Author list to choose "R"? If so, how does a customer browse thru Author's by the letter R ?
Also, I need a field that is used for Series since some books are continued storylines but different authors and customers like to search for ones in the series that they are missing?
I just can't seem to wrap my brain around how some of this works. :cry:
Thanks!
I've been reading and re-reading and found that I needed to turn on the Author box, which I did... but ... it looks like it will only work "correctly" if I list the complete author's names. I see that I can "add" the name as I enter a book, but it takes you away from the product editing/insert page and doesn't take you back. It just seems insane to add every single author's name to a list instead of just sorting into categories by last name initial... but if I use the Author box for that you don't see who wrote the darn book all you see is a letter!
I must be looking at this in a totally wrong way.
My old site was a osC site so I am probably just confused because of the change over...well...atleast that's my excuse and I'm sticking to it! :D
Still haven't found a field to use for Series.
Lilleypadgifts
its insanely stupid for me to reply months later, I didn't come here much I am doing a house up :)
.. the authors system can be a pain if one just doesn't want to do it like that..
The original design by Moku was done in this way because it eases the way the data is held... I used to run two logged in browser windows of admin, one to add authors, the other doing the normal product insertion once the new author is in.
The authors search sidebox does just list authors in alpahabetical order.. But if someone wants a another way of searching they can use the normal zencart searchbox to trace products , it should search authors names in its general search.
So use the full authors name otherwise it will give an odd authors sidebox search list just of your first letters.
Looking at product info (product_book_info) I can click on Author
and it should show me all books by that author Unfortunately it only does a refresh of the current page. I've seen that on several other sites it uses the "Hareslade-filters". How can I tell this ZenCart to use the "Hareslade-filters" ?
I'm using ZenCart 1.3.6.
Thanks!
Hi biscayne
difficult to know why you get that prob, actually its almost certainly not a simple page refresh, its doing whatever it should, but there is some error arising on doing it, so the page is being returned to its source page on a 'redirect'. Which book zip are you using?
I'm using the filters from the ZC1.3.6d zip-file.
When I continue testing I see the following behaviour.
If there's more than 1 book by this author clicking on author links to the home page:
http://www.theatrebookshop.eu/index....tolvfsaqe17e70
If there's only 1 book by this author clicking the author refreshes the page:
http://www.theatrebookshop.eu/index....tolvfsaqe17e70
I can't understand why this is happening :unsure:
Actually the problem shows with more than one book per author.
When I do an advanced search on author name with a program I wrote myself I get the correct result:
http://www.theatrebookshop.eu/index....azan&x=19&y=10
Also checked the data and they seem to be correct as well.
Why don't I get this result with :
http://www.theatrebookshop.eu/index....tolvfsaqe17e70
?
:frusty:
HI
The second link you quoted was
one from my own my own site,Code:/index.php?main_page=index&book_authors_id=15620&typefilter=book_authors
theres no diffence in the page url request format (given its two different id's on 2 sites) so it looks okCode:/index.php?book_authors_id=6&typefilter=book_authors&main_page=index
but book_authors_id=15620 is a very high number, is there a reason for this?
you'll maybe have to work out how the book authors search works in the php, its too difficult to analyze from a distance,
specially as i get pages in german, and the book authors searchbox isn't apparently currently showing on your site
Thanks for thq quick reply.
The pages are in Dutch and in English
(http://www.theatreandfilmbooks.eu).
Search on author name is part of our own version of Advanced Search.
The number 15620 is rather high but even if it was 99999 that should not be causing this problem.
Putting the URL the same as your URL indeed does not change anything. Have there been any changes in data of the Product Type Book since ZC version 1.3.5 ?
oops wrong URL
it should read
http://www.theatrebookshop.eu
or http://www.theatreandfilmbooks.com
oops, between us we are doing a terrible job of this. I am most apologetic to mix up dutch and german.. !
regarding the 15620 I was just interested to see how it got that high, usually it starts from author id = 1
---> history...
V1 book was for zencart 1.3.6, it was single language, currently i can't locate it on my site maybe it dropped off during the site changeover, or i thought the v2 for 1.3.7 was the better one to use.
I did the updated single language version for v1.3.7, ZC1_3_7_EXTENDED_MOKU BOOK_TYPE_JPH_V_2.zip 20 March 2007
at
http://www.jphuk.co.uk/zc/index.php?...roducts_id=482
there was then also a V3 beta version of the ***multilanguage*** for 1.3.7 as well, see the green text on that page. Note, I am using the V3 beta in single language mode, on the above website.
The v1.3.8 book version v4 is at
http://www.jphuk.co.uk/zc/index.php?...roducts_id=490
But you are using zencart v1.3.6 you say, so you're on v1 of book, but that only runs with a single language..? yet your site has two languages.. you need V3 (beta) multilanguage for multilanguage zencarts, and you need zencart v1.3.7 to run it in...
or use the v4 / zencart 1.3.8 setup
To run V3 beta in 1.3.6 zencart you'd have to go back and look at what zencart changed 1.3.6 -> 1.3.7, i can't tell if it works retrospectively.
To be honest yes, there were search bugs/mistakes fixed through those v1 to v4 versions, V4 is the best one, for zencart 1.3.8.
You should find a txt file in each version's fileset saying approximately what changed.
I know I sound like a company, 'but strictly you should be using latest zencart 1.3.8 if using multilanguage,' as the book v4 is the best debugged one, ...its a complex bit of kit the book add-on, i improved and corrected various things over time.
I don't have the book demo's for the 1.3.7 multilanguage any more, I dropped them when i moved website domain. The 1.3.8 demo's are on my signature below.
Indeed the cause of the high id for authors is historical (converted data).
Ever since installing the first Moku version of Product Type Book, I've been modifying and adding also quite a lot, so upgrading to version 1.3.8 will be not a straight forward job, also the bookstore does not see the advantage of having the latest version, they are OK with my "tailor made" version.
I'll dig into the several versions to see if I can find out what is causing this weird problem.
Thanks a lot for your explanation and all the links, this makes my job easier.