Forums / Bug Reports / [Done 2.0.0] Tell a friend send URL only for regular products, not other product type

[Done 2.0.0] Tell a friend send URL only for regular products, not other product type

Locked

Started by nikko666 on 23 Feb 2008, 3:07 PM · Views: 5,162

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
23 Feb 2008, 3:07 PM
#1
nikko666 avatar

nikko666

New Zenner

Join Date:
Sep 2007
Posts:
2
Plugin Contributions:
0

[Done 2.0.0] Tell a friend send URL only for regular products, not other product type

module/pages/tellafriend/header only supports product_info
because music product links to product_music_info, the tell a friend function does not work with these product.

solution,
add in the filename.php a definition for the product_music_info page
then change this to test if it is a music product

$html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\n\n','<br />',EMAIL_TEXT_LINK), '<a href="'.zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']).'">'.$product_info->fields['products_name'].'</a>' , '', false);

should be

23 Feb 2008, 3:23 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Done 2.0.0] Tell a friend send URL only for regular products, not other product type

Not quite correct.

The better solution, which will support any product-type would be to change this:

    $html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\n\n','<br />',EMAIL_TEXT_LINK), '<a href="'.zen_href_link([B]FILENAME_PRODUCT_INFO[/B], 'products_id=' . $_GET['products_id']).'">'.$product_info->fields['products_name'].'</a>' , '', false);

to this:```
$html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\n\n','<br />',EMAIL_TEXT_LINK), '<a href="'.zen_href_link([B]zen_get_info_page($_GET['products_id'])[/B], 'products_id=' . $_GET['products_id']).'">'.$product_info->fields['products_name'].'</a>' , '', false);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.