You can find an updated module here: https://sourceforge.net/projects/zen...?source=navbar
Please note that I have simply removed the requirement for tpl_modules_whats_new.php since there is currently no Bookx modification in there.
Regards,
p.
Printable View
You can find an updated module here: https://sourceforge.net/projects/zen...?source=navbar
Please note that I have simply removed the requirement for tpl_modules_whats_new.php since there is currently no Bookx modification in there.
Regards,
p.
Thank You. I downloaded the new plugin version. Now I will try to do the file mods in the Edit Manually Directory in my test site.
Thanks again, I will let you know how I make out after the I try the complete installation.
Bookx plugin installed perfectly and all files and modified files are on the live site and it seems to be working fine.
I guess I didn't realize this but since I added a different product type my other plugins do not work with the new product type (bookx). Now I need to find someone to expand my CEON URI, Vendor Shipping with PDF and Easypopulate plugins. I don't think I am capable of doing this myself. If you are interested in tackling this or know of someone who would be interested, please PM me.
Hi fjbern,
glad it works as advertised finally!
I suspect the first two plugins you mention are easier to get to work with BookX, but "Easy populate" is a different animal. Another member has asked me about this a few posts below, and it is not such a trivial task.
I myself am more focussed on getting BookX out of BETA as there are still a few bits which I would like to get working first. So short answer is: as it looks now i will not tackle the Easy Populate functionality in the near future.
Best regards,
p.
Of the three plugins I mentioned I would have thought that the easypopulate one would be the easiest. I think you can just add custom datafields in the easy populate admin. The CEON URI looks like a bear! Anyone out there integrated CEON URI WITH Bookx I would like to hear from you.
Hi
You can. I'm not sure if I can guide you, cause it has been a while since I did that, but look at :
admin/includes/modules/product_bookx/ and compare with the normal product.
The files are this ones:
collect_info.php
copy_to_confirm.php
delete_product_confirm.php
preview_info.php
update_product.php
Ex: For the update , I have a include file, because bookx looks for a additional update_product*.php around line 380 ( I have 0.9.4-revision4 of bookx), but in others I dont', because I became aware of that latter. So see if you can take advantage of that.
So I created a update_product_seo.php that has ( in the same folder)PHP Code:
//** look for additional update_product*.php files and include now **//
$incl_dir = @dir(DIR_FS_ADMIN . '/includes/modules/product_bookx');
while ($file = $incl_dir->read()) {
if ('update_product_' == substr($file, 0, 15)) {
include_once DIR_FS_ADMIN . '/includes/modules/product_bookx/' . $file; // This should handle any extra values collected in collect_info*.php
}
}
$incl_dir->close();
For the collect_info.php same thing, created a collect_info_seo.php,PHP Code:
// BEGIN CEON URI MAPPING 1 of 1
require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php');
$ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
$ceon_uri_mapping_admin->updateProductHandler($products_id, $zc_products->get_handler($product_type));
// END CEON URI MAPPING 1 of 1
and around line 1158PHP 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
In the preview_info.php , it's diferent (don't ask me why)PHP Code:
<?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 ?>
Around line 84 you'll see :
Around line 146PHP Code:
foreach ($bookx_author_ids as $key => $author_id) {
$pInfo->authors_display .= (!empty($pInfo->authors_display) ? ' | ' : '') . ($bookx_author_type_ids ? bookx_get_author_type_description($bookx_author_type_ids[$key], (int)$_SESSION['languages_id']) . ': ' : '') . bookx_get_author_name($author_id);
}
}
// BEGIN CEON URI MAPPING 1 of 4
require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php');
$ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
$ceon_uri_mapping_admin->productPreviewProcessSubmission($current_category_id);
// END CEON URI MAPPING 1 of 4
} else {
Line 274PHP Code:
while (!$genres->EOF) {
$pInfo->genres_display .= (!empty($pInfo->genres_display) ? ' | ' : '') . $genres->fields['genre_description'];
$genres->MoveNext();
}
// BEGIN CEON URI MAPPING 2 of 4
require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php');
$ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
$ceon_uri_mapping_admin->productPreviewInitialLoad((int) $_GET['pID'],
$zc_products->get_handler((int) $_GET['product_type']));
// END CEON URI MAPPING 2 of 4
}
Around 353PHP Code:
<tr>
<td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION, $pInfo->products_url); ?></td>
</tr>
<?php
}
?>
<?php // BEGIN CEON URI MAPPING 3 of 4
$ceon_uri_mapping_admin->productPreviewOutputURIMappingInfo($languages[$i]);
// END CEON URI MAPPING 3 of 4 ?>
<tr>
<td><?php echo zen_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
</tr>
copy_to_confirm.phpPHP Code:
echo ( (isset($_GET['search']) && !empty($_GET['search'])) ? zen_draw_hidden_field('search', $_GET['search']) : '') . ( (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search'])) ? zen_draw_hidden_field('search', $_POST['search']) : '');
// BEGIN CEON URI MAPPING 4 of 4
echo $ceon_uri_mapping_admin->productPreviewBuildHiddenFields();
// END CEON URI MAPPING 4 of 4
echo zen_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . ' ';
But I also have the metatags ( not entirely working ), so in this folder I havePHP Code:
if ($_POST['copy_discounts'] == 'copy_discounts_yes') {
zen_copy_discounts_to_product($old_products_id, (int)$dup_products_id);
}
// BEGIN CEON URI MAPPING 1 of 1
require_once(DIR_WS_CLASSES . 'class.CeonURIMappingAdminProductPages.php');
$ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
$ceon_uri_mapping_admin->copyToConfirmHandler($products_id_from, $products_id_to,
$product->fields['products_type'], $zc_products->get_handler($product->fields['products_type']),
$categories_id);
// END CEON URI MAPPING 1 of 1
collect_info_metatags.php
collect_info_seo.php
delete_product_confirm.php
preview_info.php
update_product_seo.php
collect_info.php
copy_to_confirm.php
preview_info_meta_tags.php
update_product.php
I don't remember changing anything in meta_tags files. I think I just copy from modules/product
Note: Metatags are working as normal product, but as I remember without them, I couldn't had any metatags at all.
This is what I remember.... hope it can guide you.
You can also put a file that starts with preview_info and ends with ".php" and it will be included, but further down in the script, so all variables from the POST are available.
Line 144:
So if you put a file "preview_info_myextrainfo.php" in the same folder, it gets included.Code://** look for additional preview_info*.php files and include now **//
$incl_dir = @dir(DIR_FS_ADMIN . '/includes/modules/product_bookx');
while ($file = $incl_dir->read()) {
if ('preview_info_' == substr($file, 0, 13)) {
include_once DIR_FS_ADMIN . '/includes/modules/product_bookx/' . $file; // This should handle any extra values collected in collect_info*.php
}
}
$incl_dir->close();
Regards,
p.
I'm trying to install the latest bookx release with zencart 1.54
I just have this installed.
I dont' see anyone reporting this....so I guess some data base config ?
Code:[01-Sep-2015 19:03:14 UTC] PHP Fatal error: 1366:Incorrect integer value: '' for column 'type_sort_order' at row 1 :: insert into product_bookx_author_types (type_sort_order) values ('') ==> (as called by) /home/daniel/public_html/zen154.dev/zencc/includes/functions/database.php on line 53 <== in /home/daniel/public_html/zen154.dev/includes/classes/db/mysql/query_factory.php on line 155
I also had this issue installing zencart, but there was a fix saying (This is ONLY necessary if you're getting this specific error, and have STRICT_ALL_TABLES enabled in MySQL.)
ThanksCode:[01-Sep-2015 18:23:18 UTC] PHP Fatal error: 1101:BLOB/TEXT column 'logmessage' can't have a default value :: ALTER TABLE admin_activity_log ADD COLUMN logmessage mediumtext NOT NULL default '' ==> (as called by) /home/daniel/public_html/zen154.dev/zencc/includes/classes/class.admin.zcObserverLogWriterDatabase.php on line 90 <== in /home/daniel/public_html/zen154.dev/includes/classes/db/mysql/query_factory.php on line 155
Are you getting this error when inserting a new author type?
If so, are you entering a (numerical) value in the field "sort order"?
If you are getting this error when you insert new author type without entering a sort order then please try entering a value (even zero 0 is fine) and tell me if you still get the error?
thx,
p.
Hi
It was the mysql config that was causing this issue.
I had troubles installing zencart , I had to apply this fix:
https://www.zen-cart.com/showthread....57#post1268657
It seems that with sql_mode=STRICT_TRANS_TABLES, you can't insert authors and authors types ( didn't test the others fields)
So today I changed to
sql_mode=NO_ENGINE_SUBSTITUTION
Usually I'm on Nginx with the same db, but never saw this error in other scritps. But for zencart I've used xampp, that had it's own db. I've change to a lamp cause I'm on linux, and this errors stared to come up.
everything it's ok :)
Thanks
Thanks for letting me know, this is all new to me, I will look into it to see, if it's something I can fix in BookX.
Best regards,
p.
Hi
I'm working on bookx EP import, but I'm getting a lot of this warnings in the log:
PHP Warning: Invalid argument supplied for foreach() in /home/daniel/public_html/zen154.dev/zenadmin/includes/modules/product_bookx/collect_info.php on line 782
As I have SEO uri, possibly the line is different , but I didn't mess with this lines:
It's just a warning, I don't see no working issues, but I wonder what could it be ?
No one else getting this warning ?
ThanksPHP Code:
foreach ($product_assigned_authors as $product_assigned_author) {
echo '<div class="drop_down_div">';
echo zen_draw_hidden_field('assigned_author_db_id[' . $author_counter . ']', $product_assigned_author['primary_id']);
echo TEXT_PRODUCTS_BOOKX_AUTHOR . ' ' . zen_draw_pull_down_menu('bookx_author_id[' . $author_counter . ']', $authors_array, $product_assigned_author['bookx_author_id']);
if (1 < count($author_types_array)) {
echo TEXT_PRODUCTS_BOOKX_AUTHOR_TYPE . ' ' . zen_draw_pull_down_menu('bookx_author_type_id[' . $author_counter . ']', $author_types_array, $product_assigned_author['bookx_author_type_id']);
};
echo '</div>';
$author_counter++;
}
Actually I didn't , but I got around with other price range boxes that I made, so I'm satisfied with the front page.
Best regards
Actually I didn't , but I got around with other price range boxes that I made, so I'm satisfied with the front page.
Well, this was the answer to this.... but I dont' get how this quick reply works :blink:
https://www.zen-cart.com/showthread....26#post1290626
Best regards
Not sure what the issue could be. In the unmodified collect_info.php an empty array is created on line 100:
then possibly it is filled with some content on lines 139 and 169:Code:$product_assigned_authors = array();
So far it has always been safe to pass an empty array to a foreach loop, so not sure what the Warning is relating to.Code:$product_assigned_authors[] = array('primary_id' => $assigned_authors->fields['primary_id'], 'bookx_author_id' => $assigned_authors->fields['bookx_author_id'], 'bookx_author_type_id' => $assigned_authors->fields['bookx_author_type_id']);
$product_assigned_authors[] = array('primary_id' => '', 'bookx_author_id' => $author_id, 'bookx_author_type_id' => $bookx_author_type_id);
Have you made any changes like IF blocks, that prevent line 100 from creating the empty array?Code:foreach ($product_assigned_authors as $product_assigned_author) {
Regards,
p.
Sorry
Actually, I'm working only with bookx rc6 and zencart 1.54 ... no mods, no nothing
Best regards
I have that line in 132 , bellow :
$assigned_authors = $db->Execute('SELECT * FROM ' . TABLE_PRODUCT_BOOKX_AUTHORS_TO_PRODUCTS . ' WHERE products_id = ' . $pID);
$product_assigned_authors = array();
Have you made any updates lately ?
Indeed, you are missing these two lines on line 100:
It is true I had not included the very latest files in 1.9.4 revisoin 6 since some more files have changed on the way to next version. Just the Fatal Error which fjbern got while installing Bookx.Code:$product_assigned_authors = array();
$product_assigned_genres = array();
So add those two lines, the error should go away and then when the next version comes along they will be included :)
Regards,
p.
Thanks
I was checking the rc 4, and those two lines were there.
ok. Thanks
Wound't be better to use git instead ?
Well, most of my use of git is downloading :) , but I see that some functionality like diffs, are available, that could simplify the updates.
This because to change stuff in zencart, we are oblige to mess with core files, etc...
In drupal for modules, there is a stable (recommended release) , and a dev one.
Something like that
Best regards
I have only recently started using git, so I will look into creating a project page for BookX as well...
p.
Good news ! :smile:
Hi
I'm getting this errors on install
Code:[07-Nov-2015 11:11:48 UTC] PHP Warning: sprintf(): Too few arguments in /home/daniel/public_html/zen154.dev/zenadmin/includes/init_includes/init_product_type_bookx.php on line 247
[07-Nov-2015 11:11:48 UTC] PHP Fatal error: 1064:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1 :: REPLACE INTO admin_pages_to_profiles (profile_id, page_key) VALUES ('2', 'bookxProduct' ==> (as called by) /home/daniel/public_html/zen154.dev/zenadmin/includes/init_includes/init_product_type_bookx.php on line 903 <== in /home/daniel/public_html/zen154.dev/includes/classes/db/mysql/query_factory.php on line 155
I've check some older threads about the init_product_type_bookx.php , but It looks that I have the updated files :
I have this on line 631, and 903.
Or my eyes are messed up, or they look the same
Line 631
Line 903PHP Code:
while (!$profile_ids->EOF) {
$db->Execute("REPLACE INTO {$const['TABLE_ADMIN_PAGES_TO_PROFILES']} (profile_id, page_key) VALUES ('{$profile_ids->fields['profile_id']}', 'bookxProduct'");
$profile_ids->MoveNext();
}
PHP Code:
$db->Execute("REPLACE INTO {$const['TABLE_ADMIN_PAGES_TO_PROFILES']} (profile_id, page_key) VALUES ('{$profile_ids->fields['profile_id']}', 'bookxProduct'");
$profile_ids->MoveNext();
About line 247 , it's something about languages..... Now, I had just my language. Now I place English again, but I still get this warning
help ?PHP Code:
if (!empty($files_missing)) {
$messageStack->add('' . sprintf(BOOKX_MS_SOME_LANGUAGE_FILES_MISSING, $language) . '<br />'.implode(', ', $files_missing), 'caution');
}
Thanks
Hi
It was really my eyes :)
As it was mention before there's a missing bracket.
So this is wrong :
$db->Execute("REPLACE INTO {$const['TABLE_ADMIN_PAGES_TO_PROFILES']} (profile_id, page_key) VALUES ('{$profile_ids->fields['profile_id']}', 'bookxProduct'");
This is wright :
$db->Execute("REPLACE INTO {$const['TABLE_ADMIN_PAGES_TO_PROFILES']} (profile_id, page_key) VALUES ('{$profile_ids->fields['profile_id']}', 'bookxProduct')");
But reading the other threads, I thought the this was fixed .... I've downloaded from sourge and zencart....I guess it's was not
Best Regards
Hi mesnitu,
thanks for tracking down this error. I was convinced too that I had uploaded the fixed installation file, but indeed I had not.
I will do it right away, and yes you are correct, it is missing the closing bracket on both lines as you have indicated.
best regards,
p.
Hi
Me again :)
I'm having a litle issue with authors listing images....
If I enable the "require image" in zen config , I get the existing authors images, but the ones that dont' have a image , I get this
Is this the way it should work ?HTML Code:<td class="bookxAuthorListingImageCell"><img src="" alt="" width="200" height="120"></td>
I not going to enable the image require, but, probably, if there is no image, some default image should be given....
Thanks
Hi mesnitu,
this is good point. Here is what I will implenet, in case you want to use it now:
in file "[ZEN_CART]/includes/modules/pages/bookx_authors_list/header_php.php"
change line 83 from
to this (adjust filename or extension jpg in case you want something different):Code:,'author_image' => (!empty($bookx_authors_listing->fields ['author_image']) ? DIR_WS_IMAGES . $bookx_authors_listing->fields ['author_image'] : '')
Of course you then need to place a default image "author_image_missing.jpg" in directory "[IMAGES]/bookx_authors/".Code:,'author_image' => (!empty($bookx_authors_listing->fields ['author_image']) ? DIR_WS_IMAGES . $bookx_authors_listing->fields ['author_image'] : DIR_WS_IMAGES. 'bookx_authors/author_image_missing.jpg')
Best regards,
p.
Done :thumbsup:
Thanks !
Hi
This mod is definitely the route I want to go down - I have installed it with v1.5.4 but when you enter an Author's webpage (which it specifically says do not enter the http://) it gives me a link of http://mydomain.com/catalog/index.ph...HORWEBPAGE.com
Clicking on it just takes me back to http://mydomain.com/catalog/index.php?main_page=index
Have I missed a setting somewhere please?
Thanks in advance
Hi Digi,
this issue is new to me, but I think ZC is translating the link, rather than Bookx.
Do I understand correctly, in the author URL field in the backend you enter:
and in the html code you get the URL:Code:AUTHORWEBPAGE.com
where "mydomain.com" is the domain of your website?Code:http://mydomain.com/catalog/index.php?main_page=redirect&action=url&goto=AUTHORWEBPAGE.com
Posts around the web with similar issues of a "redirect" instead of proper link URLs suggest, that this may have to do with some other problem. Could you see if you there is something helpful in your errorlog in the cache folder?
On what page are you seeing this problem? product_info (detail ?) or product_listing or ...?
Regards,
p.
Ok I have an 11,000 strong books site which I wish to convert to the BookX system so at this point in time I have a brand new v1.5.4 system installed along with the BookX plugin so it's completely clean.
I have entered the Author: A J Carella as my first author (under BookX Authors) and entered her webpage as: www.facebook.com/ajcarella - on the v1.5.1 site under the Author Info sidebox this works because she is treated as a Manufacturer.
On the test site if I use the Author Drop-Down field in the sidebox (we won't be using the Author Type field) and select A J Carella I get a centre box with her description and the Webpage Author link. That link is my domain with a url redirect to her Facebook page. When I click the link it opens up a new browser tab but my Index page.
Please feel free to try it it out:
http://digibooks.org.uk/DB_Library_2018/ and select A J Carella from the author drop-down. It's all very basic as you will see but I want to get BookX cracked before I even attempt a massive update of our existing site :)
Just going to check the cahe folder and error logs as well
I have the same behaviour here in my installation, so no need for cache error log from you at this time. Not sure with what ZC version this was introduced, since it was working back in 1.5.1 I think. Anyway, I will let you know what I find out.
Regards,
p.
Well, don't ask me why this was working before and now it isn't, but the "redirect&goto=..." etc. link conversion was indeed part of the BookX code.
I have changed it and you can find an updated BookX distribution version 0.9.4revision8 at sourceforge. I will upload the new archive here at ZC.com as well, but it will probably take a little to show up in the download section.
The only changes are in these two files:
Best regards,Code:ZEN-CART/includes/modules/pages/product_bookx_info/main_template_vars_product_type.php
ZEN-CART/includes/classes/observers/class.bookx_observers.php
p.
Hi
I've made a extension for EP4 , the EP4Bookx , to import bookx product type by a csv file.
It still only works with the default language ( it only imports your default language). If you have a book shop with more than one language, I think there's a way to get around, but not to fancy. Anyway, soon I hope to finish this part. If you use just one language, it's ok.
Note: This is working with EP4.0.31 (or 30). EP4.0.32, will have some changes in the code, so I guess only then, there is a possibility to incorporate EP4Bookx with a zencart notifier.
Anyway, it inserts, updates and deletes bookx fields, supports multiple authors and genres, doing them as you would for EP4 categories. So :
Author A^Author B^Author C
It has the ability to assign some default values to bookx fields, so if a fields is left empty ( intentionally or not ), the default value is used.
Also about types with multiple authors : If you have a default type assign ( writer, or whatever ) , then in the file, things could go this way :
We can fill all the fields
Authors names: Author A^Author B^Author C
Authors Type: Writer^Illustrator^Wirter
But also
Authors names: Author A^Author B^Author C
Authors Type: (empty )
So, all the authors are of type writer.
Or
Authors names: Author A^Author B^Author C
Authors Type: Writer^Illustrator
In this case, Author C would be writer .
Well, hope you'll find it useful,
Do your changes in a local environment, this is still in Beta. I'll try to fix and improve issues that could come up.
For now, it's just a quick way to fill all bookx fields.
It's on git : https://github.com/mesnitu/EasyPopulate-4.0-BookX
Best regards
Edit : Just to mention: it imports the name, not the authors, publishers description and images, etc...
bookx_author_name
bookx_author_type
bookx_subtitle
bookx_genre_name
bookx_publisher_name
bookx_series_name
bookx_imprint
bookx_binding
bookx_printing
bookx_condition
bookx_isbn
bookx_size
bookx_volume
bookx_pages
bookx_publishing_date
Ok that is just giving me www.facebook.com%2fajcarella instead of www.facebook.com/ajcarella
In the bottom left-link of the screen it is showing correctly but linking me to www.facebook.com%2ajcarella so it looks like the the last forward slash is being interpreted as a space character (although I would have thought that to be %20) not sure what %2 is.
I see the same issue....
Something with the urlencode:
$current_author['url'] = (!empty($authors->fields['author_url']) ? zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($authors->fields['author_url']), 'NONSSL', true, false) : '');
Makes a %2
$current_author['url'] = (!empty($authors->fields['author_url']) ? zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . ($authors->fields['author_url']), 'NONSSL', true, false) : '');
Works fine....
Thanks - that code has changed in Release 8 which was given to me yesterday to make it work with v1.5.4:
$current_author['url'] = (!empty($authors->fields['author_url']) ? (strpos($authors->fields['author_url'], 'http') ? urlencode($authors->fields['author_url']) : 'http://' . urlencode($authors->fields['author_url'])) : '');
Do I have to remove both instances of urlencode ???
Hi guys,
sorry, my bad. Indeed the urlencode makes no sense in that part of the code. I have uploaded another archive to sourceforge (still called "revision8") where these two files have been once more changed to remove the urlencode:
ZEN-CART/includes/modules/pages/product_bookx_info/main_template_vars_product_type.php
ZEN-CART/includes/classes/observers/class.bookx_observers.php
Tested it here and it works also with forward slash.
Regards,
p.
I have to download the revision8 , but , those files also take care of publishers url ?
Yes, the author URLs and publisher URLs should both be fixed.
regards,
p.
Hi Philou
I'm on a my dev machine with zen 154, and I see now that inserting a product bookx is not adding the date_added in the products table.
I've check the online shop, and I have that field filled, but I can reach a conclusion because:
first - it's a zen 151 and the bookx module it's also different.
Second - I actually upload the files as general product and convert them later.
Can you confirm this, checking you database ?
Thanks
Best Regards
Hi mesnitu,
can you verify, whether the newly inserted products have a "date_added" before you convert them to product type Bookx ?
"Date_added" shouldn't be touched by Bookx really. BookX just adds an extra table for the info that is not included in product type "general".
Regards,
p.
And after the conversion to bookx, if I change something in that book, the products_last_modified gets data.
I've seen this now, because I was working on the ep4 export and all I got was 0000.
Just imserted a product of type BookX and the products_date_added seems fine.
This is done via the MySQL command "now()", maybe your database doesn't play along?
This happens in file: [ZENCART]/[YOUR_ADMIN]/includes/modules/product_bookx/update_product.php around line 81
You could try and put in there:Code:$insert_sql_data = array( 'products_date_added' => 'now()',
'master_categories_id' => (int)$current_category_id);
and see if a newly created product has this date in the database. If no, then there's indeed a problem in the script. If yes, I suspect som time problem with your local webserver or MySQL.Code:$'products_date_added' => '2001-01-01'
Regards,
p.
Well, sorry about that Philou
I've made the two inserts with a defined date and with now() .... and both were inserted ok :lamo:
That's why I wanted to confirm, because I'm messing around a lot with this database with imports / exports, something has gone wrong... or I'm going crazy
Sorry for wasting your time !
Thanks
Best Regards
Ok. Whatever you do, don't go crazy ;)
:thumbsup:
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
I know it has been some time since I tried to implement the ceon URI mods you stated above but I could never get it to work as intended. Could you provide some help at this time? My setup:
Zen Cart 1.54
Responsive_sheffield_blue v2.0 template
Bookx version 0.9.4 r8
PHP Version 5.3.29
When I tried to implement the changes you outlined above, I got the ceon uri code at the top of the collect_info page and could not get any further, and of course no ceon box at the bottom of the page, so could we start there if you have the time. There were other problems but I thought if I could get the collect_info.php working I might be able to figure out the other pages and maybe the metatags problems also.
Best regards,
Frank
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
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
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
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
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.Code:17: define('TEXT_PRODUCT_MANUFACTURER', 'Manufactured by: ');
Regards,
p.
Thanks p.
That did the trick!
Best regards,
Frank
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.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
So please follow the suggestion and make your changes in a local machine to check if everything is ok.
But it's not working ? Do you have the CEON fields in the product edit ?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
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
Hope it helps.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 -->';
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"
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
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.PHP Code:
$products_description = $_POST['products_description'];
$products_url = $_POST['products_url'];
}
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
About the second step , now that I'm redoing it, I see that one can't use the $extra_html_end ( or at least I can't )
the Ceon it's building or collecting some info, that appears to need to be at the end. But this doesn't echo the object.
It only prints the checkbox , but not the text field.
$extra_html_end .= "<!-- BEGIN CEON URI MAPPING 2 of 2 -->" . $ceon_uri_mapping_admin->collectInfoBuildURIMappingFields() . "<!-- END CEON URI MAPPING 2 of 2 -->";
Or even saying that $extra_html_end = that object to print it at the end, doesn't work. ( or I don't know how to make it work )
So, using this :
It's ok.PHP Code:
<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 // BEGIN CEON URI MAPPING 2 of 2
echo $ceon_uri_mapping_admin->collectInfoBuildURIMappingFields();
// END CEON URI MAPPING 2 of 2 ?>
</table></td>
I've sent to git the files needed for bookx / ceon.
I'm on zc155 with bookx 0.95
But I think it's working, new bookx, updates, and move the book to other categories...
Hope it helps... and for me it's good too in the future, because it's very boring to do all this stuff all over again.
https://github.com/mesnitu/Ceon-BookX
Right
I was in pain, because I was following my own tips... this files have to be changed too :
In ceon_uri_mapping_filenames.php add :
define('FILENAME_PRODUCT_BOOKX_INFO', 'product_bookx_info');
In ceon_uri_mapping_product_pages.php add :
FILENAME_PRODUCT_BOOKX_INFO,
I just realize now that this new version has the breacrumb :) Nice !
Have you try this one on zv155 ?
I'm having a litle situation with product listing , that I recall mentioning some time ago.
I think it was on zc151 that I couldn't do it also.
Now I have a zc154 that I was making, only with zc and bookx. And it was ok.
Now, I have zc155, but I already have, the ceon, reward points, image handler, sitemapxml.
But probably this could be related to the ceon, since he's too in the index_product_listing .
But , I already remove ceon code from that page, just to test it... but no results.
making a var_dump($extra_bookx_filter_term_info);
I'll get NULL .
This is the array with bookx extra info, right ?
Or I should be looking somewhere else ?
In zc154 I was using some module for layout in columns or rows.... but I think that zen155 already has this.
Anyway, perhaps you could guide me were to look.
Thanks
Well, the only way that I can get that extra info on listings is changing the observer around line 568 from
to :PHP Code:
if ($product_name_column) {
$listing->Move(0);
$listing->cursor = 0;
Some php version.... thing ?PHP Code:
if (isset($product_name_column)) {
$listing->Move(0);
$listing->cursor = 0;
the $product_name_column is 0 in the listing array... so he's there, but only using the if ($product_name_column) , I don't get inside that IF
There's a litle addition that could be made in bookx observer class, to get the right canonical url :
Now if one filters ie: a publisher ,
?main_page=index&typefilter=bookx&bookx_publisher_id=36
the canonical url is the home page
<link rel="canonical" href="http://pb155.local:8080/" />
But there are notifies in the init_canonical.php that could be use.
so in the bookx observer, one could add on function productTypeFilterObserver() :
PHP Code:
,'NOTIFY_MODULE_PRODUCT_LISTING_ALPHA_SORTER_BEGIN'
,'NOTIFY_INIT_CANONICAL_PARAM_WHITELIST'
,'NOTIFY_INIT_CANONICAL_DEFAULT'
)
On function update()
PHP Code:
case 'NOTIFY_INIT_CANONICAL_PARAM_WHITELIST':
$this->insert_bookx_canonical($callingClass, $notifier, $paramsArray);
break;
case 'NOTIFY_INIT_CANONICAL_DEFAULT':
$this->insert_bookx_canonical_case_default($callingClass, $notifier, $paramsArray);
break;
And add this ( this is just a test )
So now the canonical link is :PHP Code:
//$zco_notifier->notify ('NOTIFY_INIT_CANONICAL_PARAM_WHITELIST', $current_page, $excludeParams, $keepableParams, $includeCPath);
function insert_bookx_canonical(&$callingClass, $notifier, $paramsArray) {
global $keepableParams;
$keepableParams[] = 'bookx_publisher_id';
}
//$zco_notifier->notify ('NOTIFY_INIT_CANONICAL_DEFAULT', $current_page, $excludeParams, $canonicalLink);
function insert_bookx_canonical_case_default(&$callingClass, $notifier, $paramsArray) {
global $db, $keepableParams, $current_page, $excludeParams, $canonicalLink;
switch ( true ) {
case ($current_page == FILENAME_DEFAULT && isset($_GET['typefilter']) && $_GET['typefilter'] != '' && ( (isset($_GET['bookx_publisher_id']) && $_GET['bookx_publisher_id'] != '' ) ) ):
unset($excludeParams[array_search('typefilter', $excludeParams)]);
$canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), 'NONSSL', false);
break;
}
}
<link rel="canonical" href="http://pb155.local:8080/index.php?main_page=index&typefilter=bookx&bookx_publisher_id=36" />
I have made a query to add the publisher name to the canonical link... but I'm not sure if that is good...to have a url link and the canonical link different.
Hi
About the filters.
I think the filters , always filters all authors, series, etc... even if they don't have a book associated.
But there's a option, on listing, to display books out of stock from authors, etc...
But out of stock is different from a book id that doesn't exist anymore....
I've done this primary simple thing, to just filter series that has books associated. I think this makes sense, but probably I' missing something.
And on the while loopPHP Code:
$bookx_filter_values_query = 'SELECT DISTINCT bs.bookx_series_id, bsd.series_name, be.bookx_series_id
FROM ' . TABLE_PRODUCT_BOOKX_SERIES . ' bs
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_EXTRA . ' be ON bs.bookx_series_id = be.bookx_series_id
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_SERIES_DESCRIPTION . ' bsd ON bs.bookx_series_id = bsd.bookx_series_id AND bsd.languages_id = "' . (int)$_SESSION['languages_id'] . '"'
. (!empty($extra_filter_query_parts['join_multi_filter']) ? $extra_filter_query_parts['join_multi_filter'] . ' ON be.bookx_series_id = bs.bookx_series_id ' : '')
. bookx_assemble_filter_extra_join($extra_filter_query_parts['join'], array('series'))
. ' WHERE 1 ' . bookx_assemble_filter_extra_where($extra_filter_query_parts['where'], array('series'))
. ' ORDER by bs.series_sort_order, bsd.series_name';
$bookx_series = $db->Execute ( $bookx_filter_values_query );
PHP Code:
while ( ! $bookx_series->EOF ) {
if ($bookx_series->fields['bookx_series_id'] !='') {
$bookx_series_name = ((strlen ( $bookx_series->fields ['series_name'] ) > ( int ) BOOKX_MAX_DISPLAY_FILTER_DROPDOWN_LEN) ? substr ( $bookx_series->fields ['series_name'], 0, ( int ) BOOKX_MAX_DISPLAY_FILTER_DROPDOWN_LEN ) . '..' : $bookx_series->fields ['series_name']);
$bookx_series_array [] = array (
'id' => $bookx_series->fields ['bookx_series_id'],
'text' => $bookx_series_name
);
}
$bookx_series->MoveNext ();
}
I think this makes more sense ? , or could be a future to have in a configuration option....to list everything even if there's no books anymore.
But personalty, I think, that it's a lot of "dead" links for a customer.
Another nice feature, would be a admin routine, upon admin click, to delete all series, etc... that don't have books anymore.
To avoid issues on series_id, probably better to replace with this:
$bookx_filter_values_query = 'SELECT DISTINCT bs.bookx_series_id, bsd.series_name, bxe.bookx_series_id as series_books
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_EXTRA . ' bxe ON bs.bookx_series_id = bxe.bookx_series_id
if ($bookx_series->fields['series_books'] !='') {
After all the logic is wrong. Some sort of products status must be made...
Meanwhile, I've done so, but possibly some more checking should be made.
Perhaps later, this could go into another level.
PHP Code:
$bookx_filter_values_query = 'SELECT DISTINCT bs.bookx_series_id, bsd.series_name, bxe.bookx_series_id as series_books, p.products_status
FROM ' . TABLE_PRODUCT_BOOKX_SERIES . ' bs
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_EXTRA . ' bxe ON bs.bookx_series_id = bxe.bookx_series_id
LEFT JOIN ' . TABLE_PRODUCT_BOOKX_SERIES_DESCRIPTION . ' bsd ON bs.bookx_series_id = bsd.bookx_series_id AND bsd.languages_id = "' . (int)$_SESSION['languages_id'] . '"
LEFT JOIN ' . TABLE_PRODUCTS . ' p ON p.products_id = bxe.products_id '
. (!empty($extra_filter_query_parts['join_multi_filter']) ? $extra_filter_query_parts['join_multi_filter'] . ' ON be.bookx_series_id = bs.bookx_series_id ' : '')
. bookx_assemble_filter_extra_join($extra_filter_query_parts['join'], array('series'))
. ' WHERE 1 AND p.products_status !=0 ' . bookx_assemble_filter_extra_where($extra_filter_query_parts['where'], array('series'))
. ' ORDER by bs.series_sort_order, bsd.series_name';
Hi
Any idea how one could use image handler on authors images, etc.... in the filters result ?
In products info page, it's ok... on all authors etc page....haven't check.
But on the filters no.
This is probably a no man's land question, it's related with image handler thread , but I guess then they'll say, they dont' know about bookx product type....
My understanding is, as long as you use the Zen_image function, IH will automatically kick in.
Thanks
I think I sorted it out :
Actually this constants (?) , were getting no values.
zen_image(DIR_WS_IMAGES . $author->fields['author_image'], $author->fields['author_name'], BOOKX_AUTHOR_IMAGE_WIDTH, BOOKX_AUTHOR_IMAGE_MAX_HEIGHT)
So I've tested with the ones from the main image, and now Image Handler is controlling the images.
zen_image(DIR_WS_IMAGES . $author->fields['author_image'], $author->fields['author_name'], MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT)
... still got to see, if the reason was because there were no values or if I have to change this extra images width / heights on bookx configs to get IH to work on all them.
Anyway, getting closer.
Thanks
Hi
Getting real hard time to have the authors description with the proper html. ( ON the admin side )
I'm using ckeditor. On products page, all html is render quite right, but when editing a author, I get a lot of this :
<p><p>&lt;p&gt;&amp;lt;p&amp;gt;Sed aliquam ultrices mauris. Sed fringilla mauris sit amet nibh.
On the books_authors, in case new:
But I've tried to do with the htmlspecialchars, but getting no good results.PHP Code:
$author_description_textarea .= '<br>' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_textarea_field('author_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '15', '' );
}
/* zen_draw_textarea_field('author_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', htmlspecialchars(bookx_get_author_description($aInfo->bookx_author_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE));
*/
I see that this is using a fucion to get the authors description. But on post , I haven't find out, how this works....
I've tried seeing the $_POST....
Thanks
Narrowing down a bit , the insert is ok, but editing, the ckeditor gets all the html tags, so on save, gets wrong......
I only just stumbled on your thread (I've only just started using the forums again).
For what it is worth, I support a heavily modified version of Zen Cart used by a publisher who sells e-books (and some “interactive books”, i.e. software). The publisher produces print versions of books as well, but that has its own website and the books are also sold through book stores (including Amazon).
I was involved in modifying ZC back at 1.3.9h and recently upgraded the site to 1.5.4 (and am working on 1.5.5a). Just some comments based on what we (and I) did. I skimmed the first page of this thread and then jumped to the last page, so I'm not certain what has been discussed in the interim. If any of what I'm about to say duplicates that, sorry!
1) I did not see any mention of ISBN numbers. Support for ISBN numbers is mandatory if you are serious about a book type.
2) We extended the "manufacturer", which in our case is an author (not the actual company running printing presses). One needs to support multiple authors for a book — many books have more than one author (especially the genre published by my client). As well, there are other people who contribute to a book (who may be authors in their own right), such as illustrators, editors, writer of a forward… I chose to treat these different roles as "types of authors".
3) If, in addition to print books, you deal with e-books (PDFs, ePUB, .MOBI…), then you may need to deal with the associated download files. Different formats of the same book each has its own ISBN number. You need to be careful with e-books because it is easy for them to be pirated.
4) You may wish to extend the concept of "reviews". Out of the box, ZC supports customer reviews, but books are often reviewed in the press and you may want to include those reviews on your site. Also, you may have another author who reviews a book, but not on your site as a "customer" (reviewers will usually get a complimentary copy) and you have to deal with entering that review on your site.
5) Similarly, if any of the books you publish win awards, you may want to introduce the concept of "awards".
Any way, good luck with your endeavours. ...John
Removing the htmlspecialchars() from the case: 'edit' , made things work....not sure if it's good or not.
This is probably related to http://docs.zen-cart.com/Developer_D...n_sanitization (?)
Hi
I'm using bookx module for a while, so I can talk about the experience as a user, but in terms of isbn, it's there. It actually formats the isbn in a proper way.
Multiple authors, multiple genres, condition, imprint, publisher, cover, sizes, subtitle, team authors, author types, images and description for all that ... etc, etc, all there.
A lot of configs, on what to present on product listings or product info page.
Genres acts like tags, so the shop I work , I've started to use the genres as categories, so categorie A = Genre A, but now, some times I add more "tags" to genres.
The manufactures... in this case, I use them equal as publishers.
Rewards and reviews... there's no specific field for that.... I usually add them to the book description.
But, out of the box, ( I didn't do it ), for example, I don't use imprints fields. I guess one could change the name, and use it as a rewards fields...not fancy, but I think it would work.
Or one could use the genre "tag" for rewards, and with that genre ID one could sideboxes, centerboxes, etc...
I've made some changes to the module, so that the book filter result could have metatags and schema markup. So I think it getting nice for search engines ( I think )
A part from the rewards or reviews, one thing that I'll do, it's a authors quotes. I like books, and I like quotes, and I like that "fortune cookie" on the site displaying quotes.
Also, there's a git plugin for EP4, that one can use to import all this fields in a csv file. It's working 98 % .
Actually on that import file, without a ISBN, you can't import.
It's probable that bookx module goes to git soon, so I guess one could help to improve it.
I had a quick glance back to the beginning of the thread. There was mention of using the “model” for ISBN. That could be made to work.
The problem I had when I got involved in the project was the client already had a Zen Cart site up and running. They had actually used the model column for the ISBN number, but it wasn't consistent. They still had remnants of the sample products in the database and, for some products, they had put stuff other than the ISBN number into the model column (I think free downloads were one of the ones with funny stuff in there).
Assuming it is doable, I would advise people who decide to use Zen Cart to start their “real” store with a database that has no sample stuff in it (and definitely not the music product type, etc.).
Keep the sample stuff for learning about Zen Cart — I'm sure that is what it was intended for anyway.
By the way, do you (did you) do anything special to deal with 10 versus 13 digit ISBNs?
I forgot, in my last post, to mention that the ISBN column I added to the products table referred to the print edition of the book; I also added an ISBN column (actually “isbn” in both cases) to the products_attributes table to associate the appropriate ISBN with each of the e-book versions.
Well, I'm talking about my experience.
I already had isbn as the model... the was a lucky start , before i even knew bookx.
At first that I had no csv to import the book fields, I've manged by excel, to make the comparison and enter the "model" to isbn field.
And I actually had a lot information, stored in metatags, so it was a matter of insert them too.
But it was a very risky process.
Now with the csv , I re-uploaded with the correct model ( the company internal code ) and isbn, etc, etc...
About the 10 digits... that's something that only Philou can reply.
Haven't seen no config for the isbn digits, so this is the isbn out of the box: 978-9-898839-84-8
I personally think this is quite a great module. Philou had a huge amount of work in it, now that I know the backs and forwards of this code.
Not much like this for free around for bookshops.
And it's made in Germany , so quite good :)
Germany :smile:
Here are a couple of links if you are interested in more about ISBNs, including how they should be formatted:
For the official specification: http://www.morovia.com/kb/EAN13-Spec...ion-10633.html
For converting from 10-digit ISBNs: http://www.isbn-13.info/
Unfortunately, my link for generating or testing the check-digit doesn't work any more :(
Found it on one of the above pages: http://www.morovia.com/education/utility/upc-ean.asp
Hi
Well, I'm not sure why the products url is altered on book info page, but the I use it for some book pdf preview.
But there´s a change in the redirect page on zencart 155.
The action url is not there anymore, as it was on 151.
So the link ends up in the main page again.
There's a notifier that can be use to re-add the action url.
case 'url':
if (isset($_GET['goto']) && zen_not_null($_GET['goto'])) {
zen_redirect('http://' . $_GET['goto']);
}
break;
I think this was the purpose of the products url on the bookx module.
Can't edit the last post.
As I'm using another observer, haven't place the code here, so perhaps this can be added to another module release.
But for anyone that misses this, while there's no fix to this, basically one can add that piece of code in includes/modules/pages/redirect.php
I believe that, because of security concerns, the “action” value has become a POST variable (i.e. set by a <form>) and hence not visible as part of the URL (which are GET variables). You should still be able to test it by checking $_POST (after going through the “sanitizer”, they are essentially re-POSTed).
Hi
Using the products url as a external link, probably one doesn't even have to go through the redirect page... Looking at the code, it seems this redirect page is used to count the clicks.
But one could have other uses for this link, and that's probably why the code is similar to the general product.
But once you go to the redirect page, that action must be there. ... I guess.
Hi
With version 155 , in the new products module , there was that issue about the $new_products->Move(0); etc.. , that we've talk about.
The issue is that is not respecting the query limits, so it would display all the results.
Further more, the while (!$new_products->EOF) { , didn't work, since the EOF is 1 on the notifier
If made this changes, and I think it's working.
Also note the MoveNextRandom(); ,
If this the right way to do it .... don't know, but it's workingPHP Code:
//$new_products->Move(0);
//$new_products->cursor = 0;
// don't understand why this is necessary, but without it shows the first entry twice ?!
//$new_products->MoveNext();
// eof ?!!?
$cursor = $new_products->cursor;
$new_products->cursor = 0;
$row = 0;
$col = 0;
while ( $new_products->cursor < $cursor) {
etc, etc.....
$new_products->MoveNextRandom();
}
So this is at includes\classes\observers\class.bookx_observers.php, related to function insert_bookx_attributes_into_new_products_listing
After all it was fixing the results limit but still was duplicating a book entry
uncomment the $new_products->Move(0); seens to fix it
Hi mesnitu,
thanks for sharing that. I am testing BookX with 1.5.5 in these days and will re-examine that issue. As I already wrote in the comments, i wasn't very have with my cursor movement to begin with :)
Best regards,
P.
Hi Philou
A old question:
Is it possible to put Bookx on Git ? I'm still working on this changing bits here and there, but I'll must go deeper and have some consistence.
I was about to put bookx on bitbucket as a private repository, but at the light of opensource, it makes more sense to be open.
If you can, please put this on git, or if you don't have the time, give me the permission to put it myself and attribute the project to you ( I believe there is a way to do that).
That way I could fork the project and go my own way.
ie: I would like to convert DB to use InnoBD with foreign keys and make some other changes that must be made to work with php7 and mysql 5.7, etc..
Let me know your thoughts.