Contributions
Request Product Info V 1.0
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
Expand All / Collapse All
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')) {
Small edit to catalog/request-product-info.php to enable customers details to be automatically filled in.
This package only contains the altered file and instructions. Not the complete package.
- Changed code in request-product-info.php for Mysql 5 compatibility
- Added table width to provide a more consistent appearance
- Fixed code to work properly with products with attributes.
This is a full package.
The support thread is at http://forums.oscommerce.com/index.php?showtopic=273666
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
Note: Contributions are used at own risk.