Thread: DUAL Pricing v2

Page 41 of 151 FirstFirst ... 3139404142435191141 ... LastLast
Results 401 to 410 of 1503
  1. #401
    Join Date
    Jan 2009
    Posts
    44
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    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!

  2. #402
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    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

  3. #403
    Join Date
    Jan 2009
    Posts
    44
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by Template Cascade View Post
    Rleepac, you need to find the part of ZC's code that controls the quantity discount and wrap an if statement around it that excludes WS customers. This can be complicated and as I've never dealt with it I can't tell you exactly where to begin.

    The if statement you will be using will be something like this.

    PHP Code:
    if (!$_SESSION['customer_whole'] || $_SESSION['customer_whole'] == '0' ) {


    //Quantity Discount code here



    Hope that gets you off to a good start. Cheers,


    Can someone help me out with this? I really need help since I have no clue when it comes to coding stuff!

  4. #404
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    What about discount prices?
    How would you go about showing quanty discount prices?

  5. #405
    Join Date
    Jan 2009
    Posts
    40
    Plugin Contributions
    1

    Default Re: DUAL Pricing v2

    Quote Originally Posted by d1rage5 View Post
    What about discount prices?
    How would you go about showing quanty discount prices?
    Do you want to define a separate quantity discount for whole sale customers or do you just want to apply a quantity discount to retail and wholesale the same.

  6. #406
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    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>&nbsp;
    <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>&nbsp;
    <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; ?>&nbsp;</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&current=' . $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&current=' . $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>'; } ?>&nbsp;</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,

  7. #407
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by Template Cascade View Post
    Do you want to define a separate quantity discount for whole sale customers or do you just want to apply a quantity discount to retail and wholesale the same.

    For both
    the way it is right now is by actual price not a %

  8. #408
    Join Date
    Jan 2009
    Posts
    40
    Plugin Contributions
    1

    Default Re: DUAL Pricing v2

    Quote Originally Posted by d1rage5 View Post
    For both
    the way it is right now is by actual price not a %

    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.

  9. #409
    Join Date
    Jan 2008
    Location
    Roswell, Ga USA
    Posts
    144
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    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.

  10. #410
    Join Date
    Jan 2009
    Posts
    44
    Plugin Contributions
    0

    Default Re: DUAL Pricing v2

    Quote Originally Posted by Template Cascade View Post
    Do you want to define a separate quantity discount for whole sale customers or do you just want to apply a quantity discount to retail and wholesale the same.
    I'm looking for a separate quantity discount for wholesale customers than I have for retail.

 

 

Similar Threads

  1. Dual Pricing - Wholesale Pricing - Some issues I was able to fix
    By hollettster in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 17 Dec 2010, 12:00 AM
  2. Dual Pricing - Wholesale Pricing for Zen 1.3.7 works with Easypopulate
    By micheloo in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 20 Jan 2010, 06:01 PM
  3. No Attributes after installing Dual Pricing - Wholsale Pricing
    By drybsmt in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 10 Sep 2009, 11:09 AM
  4. Quantity Discounts and Dual Pricing - Wholesale Pricing
    By snarkys in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 1
    Last Post: 2 Jul 2007, 06:47 PM
  5. Dual Pricing Module & Dual Tax Classes
    By WILL in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 25 May 2007, 10:44 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR