Community Add-Ons
| Maintainers: | Jack_mcs |
Request Product Info V 1.0
for osCommerce Online Merchant v2.2
This contribution adds a button to the product info and shopping cart pages. When the button is clicked, a form appears allowing the visitor to email the shop owner asking for details about the product(s).
This is a full package.
The support thread is at http://forums.oscommerce.com/index.php?showtopic=273666
This is the code that allows you to resolve the BUG that prevents the script version 1.1 to print the error which indicated that one of the required fields (Name Surname etc.) missing .
At LINE 117
FIND
<?php
if ($messageStack->size('request_info') > 0) {
?>
<?php
} else {
if (tep_session_is_registered('customer_id')) {
$account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$account = tep_db_fetch_array($account_query);
$name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
$email = $account['customers_email_address'];
}
?>
<tr>
<td><?php echo $messageStack->output('request_info'); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
}
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
And Replace IT With
<?php
if ($messageStack->size('request_info') > 0) {
?>
<tr>
<td><?php echo $messageStack->output('request_info'); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
</tr>
<?php
} else {
if (tep_session_is_registered('customer_id')) {
$account_query = tep_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int)$customer_id . "'");
$account = tep_db_fetch_array($account_query);
$name = $account['customers_firstname'] . ' ' . $account['customers_lastname'];
$email = $account['customers_email_address'];
}
}
if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'success')) {
