Re: Creating an add-on "product type book" for ZC 1.5
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
Re: Creating an add-on "product type book" for ZC 1.5
I have only recently started using git, so I will look into creating a project page for BookX as well...
p.
Re: Creating an add-on "product type book" for ZC 1.5
Re: Creating an add-on "product type book" for ZC 1.5
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
PHP 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();
}
Line 903
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
PHP Code:
if (!empty($files_missing)) {
$messageStack->add('' . sprintf(BOOKX_MS_SOME_LANGUAGE_FILES_MISSING, $language) . '<br />'.implode(', ', $files_missing), 'caution');
}
help ?
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
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
Re: Creating an add-on "product type book" for ZC 1.5
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.
Re: Creating an add-on "product type book" for ZC 1.5
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
HTML Code:
<td class="bookxAuthorListingImageCell"><img src="" alt="" width="200" height="120"></td>
Is this the way it should work ?
I not going to enable the image require, but, probably, if there is no image, some default image should be given....
Thanks
Re: Creating an add-on "product type book" for ZC 1.5
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
Code:
,'author_image' => (!empty($bookx_authors_listing->fields ['author_image']) ? DIR_WS_IMAGES . $bookx_authors_listing->fields ['author_image'] : '')
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'] : DIR_WS_IMAGES. 'bookx_authors/author_image_missing.jpg')
Of course you then need to place a default image "author_image_missing.jpg" in directory "[IMAGES]/bookx_authors/".
Best regards,
p.
Re: Creating an add-on "product type book" for ZC 1.5
Re: Creating an add-on "product type book" for ZC 1.5
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