Forums / Setting Up Categories, Products, Attributes / Product Type Book (by moku)

Product Type Book (by moku)

Started by moku on 12 May 2006, 6:37 AM · Views: 203,732

Results 461 to 480 of 647
30 Oct 2008, 10:18 PM
#461
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Product Type Book (by moku)

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:

31 Oct 2008, 5:15 AM
#462
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Product Type Book (by moku)

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:

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

Am I missing a file?

31 Oct 2008, 5:48 AM
#463
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Product Type Book (by moku)

Dumba@! I had product_book & product_book_info in the wrong folders. :oops:

Got that fixed and all is wonderful! Yee Haw!

31 Oct 2008, 11:03 AM
#464
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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...

1 Nov 2008, 4:56 AM
#465
thebasher avatar

thebasher

New Zenner

Join Date:
Dec 2007
Posts:
53
Plugin Contributions:
0

Re: Product Type Book (by moku)

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.

25 Nov 2008, 12:10 AM
#466
tekram avatar

tekram

Zen Follower

Join Date:
Feb 2006
Posts:
111
Plugin Contributions:
0

Re: Product Type Book (by moku)

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?

26 Nov 2008, 3:47 AM
#467
johnk avatar

johnk

New Zenner

Join Date:
Feb 2005
Posts:
56
Plugin Contributions:
0

Re: Product Type Book (by moku)

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.

26 Nov 2008, 5:09 AM
#468
johnk avatar

johnk

New Zenner

Join Date:
Feb 2005
Posts:
56
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

26 Nov 2008, 12:53 PM
#469
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

$zco_notifier->notify('MY_NOTIFY_GOT_PRODUCT_LIST_NAME'); 

thats where the observer class sticks it's oar in just for a book, in the display list.

A few lines above, there are two entries with

 <!--jph_notify_subtitle-->

The observer class for listings is in class.productBookListing.php ...you find that same bit of code in there.

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

<h3 class="itemTitle"> 

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.

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?

28 Nov 2008, 5:02 PM
#470
johnk avatar

johnk

New Zenner

Join Date:
Feb 2005
Posts:
56
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

28 Nov 2008, 6:30 PM
#471
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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..

30 Nov 2008, 2:13 PM
#472
johnk avatar

johnk

New Zenner

Join Date:
Feb 2005
Posts:
56
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

30 Nov 2008, 2:54 PM
#473
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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..

30 Nov 2008, 4:59 PM
#474
johnk avatar

johnk

New Zenner

Join Date:
Feb 2005
Posts:
56
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

30 Nov 2008, 7:02 PM
#475
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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..

18 Jan 2009, 5:22 PM
#476
donaldmo avatar

donaldmo

New Zenner

Join Date:
Jan 2009
Posts:
5
Plugin Contributions:
0

Re: Product Type Book (by moku)

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!

18 Jan 2009, 5:38 PM
#477
donaldmo avatar

donaldmo

New Zenner

Join Date:
Jan 2009
Posts:
5
Plugin Contributions:
0

Re: Product Type Book (by moku)

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?

  1. "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!

18 Jan 2009, 9:27 PM
#478
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

19 Jan 2009, 5:45 PM
#479
donaldmo avatar

donaldmo

New Zenner

Join Date:
Jan 2009
Posts:
5
Plugin Contributions:
0

Re: Product Type Book (by moku)

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?

19 Jan 2009, 9:29 PM
#480
hareslade avatar

hareslade

Totally Zenned

Join Date:
Nov 2004
Location:
U.K. South Wales
Posts:
442
Plugin Contributions:
0

Re: Product Type Book (by moku)

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

define('ATTRIBUTES_PRICE_DELIMITER_SUFFIX', ' )');
define('ATTRIBUTES_PRICE_DELIMITER_PREFIX', ' ( ');

If you've not altered a php file before, a php file has

 <?php
contents
?> 

You insert any extra entries anywhere between those beginning and end lines
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