pasher:
Unfortunately, the link also appears on the Category page against each product, so if requested from there, I still cannot identify the product from this info (assuming there is more than one product).
No problem!
- functions_general.php
Find ~1126 line:
return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_SHOWCASE_ONLY . '</a>';
Replace by
// BOF Add products_id to Contact Us "Button"
// return '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_SHOWCASE_ONLY . '</a>';
return '<a href="' . zen_href_link(FILENAME_CONTACT_US, 'products_id=' . $product_id) . '">' . TEXT_SHOWCASE_ONLY . '</a>';
// EOF Add products_id to Contact Us "Button"
Find ~1136 line:
$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
Replace by
// BOF Add products_id to Contact Us "Button"
// $return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
$return_button = '<a href="' . zen_href_link(FILENAME_CONTACT_US, 'products_id=' . $product_id) . '">' . TEXT_CALL_FOR_PRICE . '</a>';
// EOF Add products_id to Contact Us "Button"
- tpl_contact_us_default.php
Find ~78 line
<div class="buttonRow back"><?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?></div>
Add after
<!-- // BOF Add products_id to Contact Us "Button" -->
<?php echo zen_draw_hidden_field('products_id', ($error ? (int)$_POST['products_id'] : (isset($_GET['products_id']) ? (int)$_GET['products_id'] : 0))); ?>
<!-- // EOF Add products_id to Contact Us "Button" -->
- contact_us/header_php.php
Find ~69
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
Replace by
// BOF Add products_id to Contact Us "Button"
if((int)$_POST['products_id'] > 0) {
define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');
$email_subject = EMAIL_SUBJECT . EMAIL_SUBJECT_PRODUCTS_ID . zen_get_products_name((int)$_POST['products_id']) . ' (' . (int)$_POST['products_id'] . ')';
zen_mail($send_to_name, $send_to_email, $email_subject, $text_message, $name, $email_address, $html_msg,'contact_us');
} else
// EOF Add products_id to Contact Us "Button"
zen_mail($send_to_name, $send_to_email, EMAIL_SUBJECT, $text_message, $name, $email_address, $html_msg,'contact_us');
Better remove
define('OFFICE_REFERRER', 'Referrer page:');
and
define('EMAIL_SUBJECT_PRODUCTS_ID', ' Get info about product ');
to extra_definitions languages file.