Re: Creating an add-on "product type book" for ZC 1.5
Hi there
in the tpl product info , I found myself in need of moving things a litle bit around, but I have a doubt about how to do it .
Ex: I remove the ISBN from the product details <ul id="productDetailsList"> , and I'm using the product variable $products_isbn to display it where I want. Also I want to display products details in two div's side by side.
So more or less like this :
HTML Code:
<div id="left">
<?php
$zco_notifier->notify('NOTIFY_TPL_PRODUCT_BOOKX_INFO_DISPLAY_DOCPRODUCT_BEGIN');
echo $authors_short_html;
echo $publisher_short_html;
echo $imprint_short_html;
?>
</div> <!-- ends left -->
<div id="right">
<?php
echo $bookx_extra_attributes_html;
echo $publishing_date_html;
echo $products_condition_html;
echo $genres_html;
echo $products_isbn;
?>
</div><!-- ends right -->
So my doubt is if I'm safe playing around in the middle of this notifiers
Code:
$zco_notifier->notify('NOTIFY_TPL_PRODUCT_BOOKX_INFO_DISPLAY_DOCPRODUCT_BEGIN');
wahtever I want
$zco_notifier->notify('NOTIFY_TPL_PRODUCT_BOOKX_INFO_DISPLAY_DOCPRODUCT_END', array('products_id' => $products_id_current));
Or this serves a order, that could break things up .
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
Hi mesnitu,
sounds like the best way to do it. The Bookx info is put in these variables on purpose so it is easy to customize output where and how you want it.
Keep the display output between the notifiers. It will not break anything if you do not keep it between the two notifiers, but that is what they are there for, to indicate start and end of display output.
Regards,
p.
Re: Creating an add-on "product type book" for ZC 1.5
Thanks !
There is another doubt, for the information on product listing.... There is a file for tabular_display, but the I think this template is using columnar display,,,, because I'm not seeing no info in the product listing .... product listing it's all the listings to specials, new, all_products, etc... right ? Or something i'm missing ?
Best regards
Re: Creating an add-on "product type book" for ZC 1.5
You must be using ZC 1.5.3 ?
I have just upgraded myself and discovered that BookX does not yet work correctly with "columnar display". There is a setting in admin to go back to "tabular display".
p.
Re: Creating an add-on "product type book" for ZC 1.5
hi
In this case it's 1.5.1 .... I changed , but nothing comes up.... this info is related with the bookx fields, rigght ? Because I removed all the zc display's for categories, models, etc.....
I have to make a new installation to see how it works...
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
Hi Philou
Not sure if you can reproduce this or if it's I that already change something else, but the imprint div, even if there is nothing there, get's listed.
I've made this small alteration :
//*** imprint info
if ($flag_show_product_bookx_info_imprint &&
(!empty($products_imprint_name) || 2 == $flag_show_product_bookx_info_imprint)) {
$imprint_detail_html = '<!-- bof bookx imprint -->
<div id="bookxImprint">';
But not sure if it's the best way. I assume that it must have a name to display something else...
Best Regards
Re: Creating an add-on "product type book" for ZC 1.5
Hi
I was trying to have a author shorter description in the books page info, so something like substr($author['description'],0,180) does the job.
But the I see the in the Author Info, it gets the same length .... Is there a easy way to work around this ?
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
Edited : Just found out that a ($_GET['id']=='indexBody') can work for this
But not sure if it's a good practice ....
Best Regards
Re: Creating an add-on "product type book" for ZC 1.5
Hi Philou,
My site has gone live finally which is great - we noticed a problem with duplicate authors showing on the search that wasn't showing normally in the categories list.
To fix it you need to add a DISTINCT to the GROUP_CONCAT function on line 310 in the class.bookx_observers.php file. I have just noticed that you had it elsewhere as well but managed to overlook this instance (and just noticed that it's needed on line 1256 as well).
The site is: www.woodbinebooks.co.uk
Thanks again for your help,
Kinsley
Re: Creating an add-on "product type book" for ZC 1.5
Hi
@redransom very nice site , simple and clean !
Well , another question to master Philou :)
I was trying to get the author image (in product_info) , to link to the authors filter, because it's something that I think it's one of the first things people's will try to click.... I guess...
Anyway , the variable $author['searchlink'] gives the name with the link, I was wondering if there is a way that I can use this.... some php array magic, because the only way I found was to add to main_template_vars_product_type file another variable :
PHP Code:
$current_author['author_image_url'] = (!empty($authors->fields['bookx_author_id']) && !empty($authors->fields['author_name']) ? zen_href_link(FILENAME_DEFAULT, '&typefilter=bookx&bookx_author_id=' . $authors->fields['bookx_author_id']) . '' : '');
But I don't want to get much apart from the original files, for future updates, etc.....
Thanks !