Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
Hi Frank,
menitu must respond to you, since he wrote the original post.
Let me just point out again, that there is an inclusion mechanism, which allows you to place a file which begins with "collect_info" like "collect_info_ceon_uri.php" and it will be included automatically by "collect_info.php". The same must then be implemented for "preview_info" and "update_product", so you deal with all your extra data in all three files and leave the original files untouched (if possible).
Regards,
p.
Hello p.
I created a file "collect_info_seo.php" and put in this file "// BEGIN CEON URI MAPPING 1 of 2 require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php'); $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages(); $ceon_uri_mapping_admin->collectInfoHandler(); // END CEON URI MAPPING 1 of 2
but now I only get this same text at the top of my collect_info.php page instead of ceon uri box near the bottom of the page.
I also created another file "collect_info_metatags.php" and that looks like it is functioning properly.
I have not done anything with the preview nor update yet.
Thanks for your help,
Frank
Re: New add-on "product type book" for ZC 1.5
Sorry I am not familiar myself with CEON. There is only one include of "collect_info_*.php" named files at the top of "collect_info.php"
If you need extra code anywhere else, then you do have to modify the "collect_info.php" file itself.
regards,
p.
Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
Sorry I am not familiar myself with CEON. There is only one include of "collect_info_*.php" named files at the top of "collect_info.php"
If you need extra code anywhere else, then you do have to modify the "collect_info.php" file itself.
regards,
p.
Hello p.
I uploaded the collect_info_metatags.php, preview_info_meta_tags.php and update_info_meta_tags.php files and all is well with the metatags.
That proves that your system of adding these files to the directory works.
If you do not use ceon URI for friendly url's, what do you use if any?
Best regards,
Frank
Re: New add-on "product type book" for ZC 1.5
Hi Frank,
the metatags are included by core ZEN CART functionality, not by BookX. You can verify this, by looking at the "normal" product folder in ADMIN/includes/modules/product. It also has extra collect_info_metatags.php and that has nothing to do with BookX.
As a convenience not to have to add code to the collect_info.php directly, BookX provides this extra include functionality, so your modifications do not break when an update comes along.
I don not ucrrently use user friendly URIs. Not exactly "modern", I know, but that's how it is at the moment :-)
Regards,
p.
Re: New add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
Hi Frank,
the metatags are included by core ZEN CART functionality, not by BookX. You can verify this, by looking at the "normal" product folder in ADMIN/includes/modules/product. It also has extra collect_info_metatags.php and that has nothing to do with BookX.
As a convenience not to have to add code to the collect_info.php directly, BookX provides this extra include functionality, so your modifications do not break when an update comes along.
I don not ucrrently use user friendly URIs. Not exactly "modern", I know, but that's how it is at the moment :-)
Regards,
p.
OK Thanks p.
Yes I understand this functionality of Bookx and it works great for the metatags.
I will have to investigate more on my ceon problem or maybe switch to another friendly url mod.
In the meantime on my add to cart page I get "TEXT_PRODUCT_MANUFACTURERCanon" instead of "Manfacturer Canon"
Using the Developer Tool Kit I see:
/hsphere/local/home/religiousbooks/religiousbookshop.com/includes/templates/responsive_sheffield_blue/templates/tpl_product_bookx_info_display.php
Line #575 : echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n";
Does this file need to be changed in some way?
Best regards,
Frank
Re: Creating an add-on "product type book" for ZC 1.5
Hi fj,
your are right, this definition seems to be missing from the language file of BookX. If the name of the constant is output to screen, then it means the constant is not defined.
in ZC/includes/languages/english/product_info.php there is the definition
Code:
17: define('TEXT_PRODUCT_MANUFACTURER', 'Manufactured by: ');
but in ZC/includes/languages/english/product_bookx_info.php the above line is missing. Please add it to your language file in: ZC/includes/languages/YOURLANGUAGE/product_bookx_info.php and I will insert it in the next release.
Regards,
p.
Re: Creating an add-on "product type book" for ZC 1.5
Thanks p.
That did the trick!
Best regards,
Frank
Re: New add-on "product type book" for ZC 1.5
Quote:
First let me thank you very, very much for easy populate/bookx plugin! Installed and working without a glitch. using Easy Populate 4.0.33a - Beta 02-29-2016 w/ BookX0.9.9
During this week, I'm hopping to commit some more changes to the ep4bookx, cause I found some issues related to 151, and in the way found some other minor issues that must be fix.
So please follow the suggestion and make your changes in a local machine to check if everything is ok.
Quote:
When I tried to implement the changes you outlined above, I got the ceon uri code at the top of the collect_info page
But it's not working ? Do you have the CEON fields in the product edit ?
Checking my file collect_info.php from CEON I got this:
PHP Code:
<tr>
<td class="main"><?php echo TEXT_PRODUCTS_SORT_ORDER; ?></td>
<td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '15') . ' ' . zen_draw_input_field('products_sort_order', $pInfo->products_sort_order); ?></td>
</tr>
<?php if (isset($extra_html_end)) echo $extra_html_end; // this was possibly filled by an included file above ?>
<?php // BEGIN CEON URI MAPPING 2 of 2
echo $ceon_uri_mapping_admin->collectInfoBuildURIMappingFields();
// END CEON URI MAPPING 2 of 2 ?>
</table></td>
</tr>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
And the collect_info_seo.php
PHP Code:
// BEGIN CEON URI MAPPING 1 of 2
require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php');
$ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
$ceon_uri_mapping_admin->collectInfoHandler();
// END CEON URI MAPPING 1 of 2
//$extra_html_end .= '<!-- BEGIN CEON URI MAPPING 2 of 2 -->' . $ceon_uri_mapping_admin->collectInfoBuildURIMappingFields() . '<!-- END CEON URI MAPPING 2 of 2 -->';
Hope it helps.
Re: New add-on "product type book" for ZC 1.5
I recommend that if you're going to create separate files for Ceon stuff, that you use Ceon in the filename. So, collect_info_seo.php would be collect_info_ceon.php instead. That way you know it's for Ceon, instead of assuming that Ceon is synonymous with "seo"
Re: New add-on "product type book" for ZC 1.5
Yes you are right. it should have ceon as good practice.
The include file, it's because the bookx product type allows those extra include ( witch the normal product should do too in my opinion , for the code and html).
In the normal product , that ceon code it's "manually" inserted bellow
PHP Code:
$products_description = $_POST['products_description'];
$products_url = $_POST['products_url'];
}
The bookx product type allows that one include, but on the html side another one is needed, so on updates, it will "override" that code any way.
So fjbern1943 , if you have the ceon stuff working on the normal product, just take a good look, use the "search" in your software or open a side by side window. What's on the normal product has to be the in the bookx product type also.
good luck