It helps to know that it can be done but I don't know the first thing about coding. I can copy and paste but beyond that I'm lost!
It helps to know that it can be done but I don't know the first thing about coding. I can copy and paste but beyond that I'm lost!
Hello,
I have been trying to use this module together with the Canadapost shipping module but I can't seem to integrate the 2 together.
Once the dual pricing is installed the weight, size fields for the products disappear which is required for the proper shipping calculation for Canadapost.
I am just testing this out since I burned my finger with it once, i copied the store directory and the database, and playing with the copy. I upgraded the store to 1.8a and that seem to work ok, but as I mentioned above, these do not seem to like each other.
I looked at the shopping_cart.php from before and after the installation with winmerge and there are so many differences only in this file that you gotta be a programmer to properly debug that after a merge... and how about the rest of the files...
I am willing to make a paypal donation to somebody who can modify this dual pricing module such to make it work with the canadapost module. I am surprised that nobody has ever encountered this...
Anybody from Canada using these two together successfully? Please please help me.
Thanks,
Oxxy
What about discount prices?
How would you go about showing quanty discount prices?
one more question, I am tring to merge two moded files and i get this error.
Parse error: syntax error, unexpected T_STRING, expecting ')' in /home3/scproduc/public_html/admin***page/customers.php on line 1230
admin***page is not the name for the admin area (changed it for security reasons)
below is the part of the customer.php info. if you can help and need the entire file content PM me.
I have pasted from line 1066 to 1235.
<?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
<td class="dataTableHeadingContent" align="left" valign="top" width="75">
<?php echo (($_GET['list_order']=='gv_balance-asc' or $_GET['list_order']=='gv_balance-desc') ? '<span class="SortOrderHeader">' . TABLE_HEADING_GV_AMOUNT . '</span>' : TABLE_HEADING_GV_AMOUNT); ?><br>
<a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=gv_balance-asc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='gv_balance-asc' ? '<span class="SortOrderHeader">Asc</span>' : '<span class="SortOrderHeaderLink">Asc</b>'); ?></a>
<a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=gv_balance-desc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='gv_balance-desc' ? '<span class="SortOrderHeader">Desc</span>' : '<span class="SortOrderHeaderLink">Desc</b>'); ?></a>
</td>
<?php } ?>
<td class="dataTableHeadingContent" align="center" valign="top">
<?php echo (($_GET['list_order']=='approval-asc' or $_GET['list_order']=='approval-desc') ? '<span class="SortOrderHeader">' . TABLE_HEADING_AUTHORIZATION_APPROVAL . '</span>' : TABLE_HEADING_AUTHORIZATION_APPROVAL); ?><br>
<a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=approval-asc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='approval-asc' ? '<span class="SortOrderHeader">Asc</span>' : '<span class="SortOrderHeaderLink">Asc</b>'); ?></a>
<a href="<?php echo zen_href_link(basename($PHP_SELF) . '?list_order=approval-desc', '', 'NONSSL'); ?>"><?php echo ($_GET['list_order']=='approval-desc' ? '<span class="SortOrderHeader">Desc</span>' : '<span class="SortOrderHeaderLink">Desc</b>'); ?></a>
</td>
<td class="dataTableHeadingContent" align="right" valign="top"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
$search = '';
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
$keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
$search = "where c.customers_lastname like '%" . $keywords . "%' or c.customers_firstname like '%" . $keywords . "%' or c.customers_email_address like '%" . $keywords . "%' or c.customers_telephone rlike ':keywords:' or a.entry_company rlike ':keywords:' or a.entry_street_address rlike ':keywords:' or a.entry_city rlike ':keywords:' or a.entry_postcode rlike ':keywords:'";
$search = $db->bindVars($search, ':keywords:', $keywords, 'regexp');
}
$new_fields=', c.customers_telephone, a.entry_company, a.entry_street_address, a.entry_city, a.entry_postcode, c.customers_authorization, c.customers_referral';
$customers_query_raw = "select c.customers_id, c.customers_lastname, c.customers_firstname, c.customers_email_address, c.customers_group_pricing, a.entry_country_id, a.entry_company, ci.customers_info_date_of_last_logon, ci.customers_info_date_account_created " . $new_fields . ",
cgc.amount
from " . TABLE_CUSTOMERS . " c
left join " . TABLE_CUSTOMERS_INFO . " ci on c.customers_id= ci.customers_info_id
left join " . TABLE_ADDRESS_BOOK . " a on c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id " . "
left join " . TABLE_COUPON_GV_CUSTOMER . " cgc on c.customers_id = cgc.customer_id " .
$search . " order by $disp_order";
// Split Page
// reset page when page is unknown
if (($_GET['page'] == '' or $_GET['page'] == '1') and $_GET['cID'] != '') {
$check_page = $db->Execute($customers_query_raw);
$check_count=1;
if ($check_page->RecordCount() > MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER) {
while (!$check_page->EOF) {
if ($check_page->fields['customers_id'] == $_GET['cID']) {
break;
}
$check_count++;
$check_page->MoveNext();
}
$_GET['page'] = round((($check_count/MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER)+(fmod_round($check_count,MAX_DISPLAY_SEARCH _RESULTS_CUSTOMER) !=0 ? .5 : 0)),0);
// zen_redirect(zen_href_link(FILENAME_CUSTOMERS, 'cID=' . $_GET['cID'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL'));
} else {
$_GET['page'] = 1;
}
}
$customers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER, $customers_query_raw, $customers_query_numrows);
$customers = $db->Execute($customers_query_raw);
while (!$customers->EOF) {
$sql = "select customers_info_date_account_created as date_account_created,
customers_info_date_account_last_modified as date_account_last_modified,
customers_info_date_of_last_logon as date_last_logon,
customers_info_number_of_logons as number_of_logons
from " . TABLE_CUSTOMERS_INFO . "
where customers_info_id = '" . $customers->fields['customers_id'] . "'";
$info = $db->Execute($sql);
// if no record found, create one to keep database in sync
if (!isset($info->fields) || !is_array($info->fields)) {
$insert_sql = "insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created)
values ('" . (int)$customers->fields['customers_id'] . "', '0', now())";
$db->Execute($insert_sql);
$info = $db->Execute($sql);
}
if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $customers->fields['customers_id']))) && !isset($cInfo)) {
$country = $db->Execute("select countries_name
from " . TABLE_COUNTRIES . "
where countries_id = '" . (int)$customers->fields['entry_country_id'] . "'");
$reviews = $db->Execute("select count(*) as number_of_reviews
from " . TABLE_REVIEWS . " where customers_id = '" . (int)$customers->fields['customers_id'] . "'");
$customer_info = array_merge($country->fields, $info->fields, $reviews->fields);
$cInfo_array = array_merge($customers->fields, $customer_info);
$cInfo = new objectInfo($cInfo_array);
}
$group_query = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . " where
group_id = '" . $customers->fields['customers_group_pricing'] . "'");
if ($group_query->RecordCount() < 1) {
$group_name_entry = TEXT_NONE;
} else {
$group_name_entry = $group_query->fields['group_name'];
}
if (isset($cInfo) && is_object($cInfo) && ($customers->fields['customers_id'] == $cInfo->customers_id)) {
echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit', 'NONSSL') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID')) . 'cID=' . $customers->fields['customers_id'], 'NONSSL') . '\'">' . "\n";
}
$zc_address_book_count_list = zen_get_customers_address_book($customers->fields['customers_id']);
$zc_address_book_count = $zc_address_book_count_list->RecordCount();
?>
<td class="dataTableContent" align="right"><?php echo $customers->fields['customers_id'] . ($zc_address_book_count == 1 ? TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count : '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=list_addresses' . '&cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . TEXT_INFO_ADDRESS_BOOK_COUNT . $zc_address_book_count . '</a>'); ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_lastname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['customers_firstname']; ?></td>
<td class="dataTableContent"><?php echo $customers->fields['entry_company']; ?></td>
<td class="dataTableContent"><?php echo zen_date_short($info->fields['date_account_created']); ?></td>
<td class="dataTableContent"><?php echo zen_date_short($customers->fields['customers_info_date_of_last_logon']); ?></td>
<td class="dataTableContent"><?php echo $group_name_entry; ?></td>
<?php if (MODULE_ORDER_TOTAL_GV_STATUS == 'true') { ?>
<td class="dataTableContent" align="right"><?php echo $currencies->format($customers->fields['amount']); ?></td>
<?php } ?>
<td class="dataTableContent" align="center"><?php echo ($customers->fields['customers_authorization'] == 4 ? zen_image(DIR_WS_IMAGES . 'icon_red_off.gif', IMAGE_ICON_STATUS_OFF) : ($customers->fields['customers_authorization'] == 0 ? '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=status¤t=' . $customers->fields['customers_authorization'] . '&cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '</a>' : '<a href="' . zen_href_link(FILENAME_CUSTOMERS, 'action=status¤t=' . $customers->fields['customers_authorization'] . '&cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . '</a>')); ?></td>
<td class="dataTableContent" align="right"><?php if (isset($cInfo) && is_object($cInfo) && ($customers->fields['customers_id'] == $cInfo->customers_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID')) . 'cID=' . $customers->fields['customers_id'] . ($_GET['page'] > 0 ? '&page=' . $_GET['page'] : ''), 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
</tr>
<?php
$customers->MoveNext();
}
?>
<tr>
<td colspan="5"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td class="smallText" valign="top"><?php echo $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS); ?></td>
<td class="smallText" align="right"><?php echo $customers_split->display_links($customers_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'info', 'x', 'y', 'cID'))); ?></td>
</tr>
<?php
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
?>
<tr>
<td align="right" colspan="2"><?php echo '<a href="' . zen_href_link(FILENAME_CUSTOMERS, '', 'NONSSL') . '">' . zen_image_button('button_reset.gif', IMAGE_RESET) . '</a>'; ?></td>
</tr>
<?php
}
?>
</table></td>
</tr>
</table></td>
<?php
// BOF Set variables for login_as_customer module
$place_order_button = 'includes/languages/english/images/buttons/button_placeorder.gif';
$login_as_customer = 'index.php?main_page=login_as_customer';
if (ENABLE_SSL_CATALOG == 'true') {
$url = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
} elseif (ENABLE_SSL_CATALOG == 'false') {
$url = HTTP_SERVER . DIR_WS_CATALOG;
}
$p_url = $url;
$p_url .= $login_as_customer;
//EOF Setf Variables for login_as_customer module
$heading = array();
$contents = array();
switch ($action) {
case 'confirm':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>');
$contents = array('form' => zen_draw_form('customers', FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm', 'post', '', true));
$contents[] = array('text' => TEXT_DELETE_INTRO . '<br><br><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
if (isset($cInfo->number_of_reviews) && ($cInfo->number_of_reviews) > 0) $contents[] = array('text' => '<br />' . zen_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews));
$contents[] = array('align' => 'center', 'text' => '<br />' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_CUSTOMERS, zen_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id, 'NONSSL') . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$customers_orders = $db->Execute("select o.orders_id, o.date_purchased, o.order_total, o.currency, o.currency_value,
You might want to try this module and see how it works for you.
http://www.zen-cart.com/index.php?ma...roducts_id=235
As far as the ')' error, I'd just copy that file out of the dualpricing mod again and upload it and see if that fixes it. The file was working.
*** NOTE TO ALL USERS ***
Also, please don't post that much code. It makes the forum harder to read and isn't useful. If you'd like, either attach the file to the post via the attachment function (the best option in the previous case), or wrap PHP tags around the code so that the forum creates scroll bars instead of displaying the code all at once.
the duel price mode works until i merge the two.
duel pricing and admin login as customer.
the only file common in the two is the customer.php file in the admin section.
Bookmarks