Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
DigiBooks
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.
The link works fine as long as it it just a basic domain link - the problem is when you enter forward slashes into the address.
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
DigiBooks
The link works fine as long as it it just a basic domain link - the problem is when you enter forward slashes into the address.
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....
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
mesnitu
I see the same issue....
Makes a %2
Actually, for me makes a %2F... so it should be ok... but it's not.
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
mesnitu
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 ???
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
DigiBooks
Do I have to remove both instances of urlencode ???
I haven't tested the new code. Is it working now ?
I was just mentioning what I've seen.
It's better to wait for Philou update.
Best Regards
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
mesnitu
I haven't tested the new code. Is it working now ?
I was just mentioning what I've seen.
It's better to wait for Philou update.
Best Regards
No worries. The code was changed because something had happened since v1.5.1 and the redirect just returned zen-cart's index page. With the change in Release 8 it is working provided there are no forward slashes in the url.
Re: Creating an add-on "product type book" for ZC 1.5
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.
Re: Creating an add-on "product type book" for ZC 1.5
Quote:
Originally Posted by
philou
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.
Sweet!!! Thank you so much :)
I will continue to play around with the system now so will let you know how it all goes
Re: Creating an add-on "product type book" for ZC 1.5
I have to download the revision8 , but , those files also take care of publishers url ?
Re: Creating an add-on "product type book" for ZC 1.5
Yes, the author URLs and publisher URLs should both be fixed.
regards,
p.