Thread: DUAL Pricing v2

Page 1 of 2 12 LastLast
Results 1 to 10 of 1503

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing - add "plus sales tax"-message for wholesale-group

    Quote Originally Posted by mattinnz View Post
    I am only wondering if there is an easy way to let the wholesale customers know that they have to pay an additional sales tax (e.g."plus GST"). Could this message appear next to the price (or alternatively as permanent header/when they log in)?
    ... till later ...
    Matt
    Matt, Which one do you want to do? You could modify the wording of "Whole Sale Price:" to something more suitable on line 94 of includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

    The other method would be to add another check for a whole sale customer and display a notice in the header. This would probably happen in your includes/header.php file or your could use the messageStack feature built into Zencart (gives a notice like when you forget to delete your install directory).

    The code to check for a wholesale customer looks like this. You can change your template to display a notice anywhere you want using this in any file you chose.

    PHP Code:
    if ($_SESSION['customer_id']) {
      
    $customers_id $_SESSION['customer_id'];
        
    $customer_check $db->Execute("select * from " TABLE_CUSTOMERS " where customers_id = '$customers_id'");
     if (
    $customer_check->fields['customers_whole'] != "0") { 
        
    CODE YOU WANT TO USE IF CUSTOMER IS WHOLE SALE


     
    }


  2. #2
    Join Date
    May 2008
    Posts
    2
    Plugin Contributions
    0

    Default Re: DUAL Pricing - add "plus sales tax"-message for wholesale-group

    Hi madfastride,

    thank you for your immediate solution.
    I was missing that file in my current template (method one).
    I changed the original file by adding "plus GST" and uploaded it.
    Now everything works fine.
    Wholesalers can even see the retailprice at the same time.
    ... till later ...
    Matt

  3. #3
    Join Date
    May 2008
    Posts
    14
    Plugin Contributions
    0

    Default Re: DUAL Pricing - add "plus sales tax"-message for wholesale-group

    Quote Originally Posted by madfastride View Post
    Matt, Which one do you want to do? You could modify the wording of "Whole Sale Price:" to something more suitable on line 94 of includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

    The other method would be to add another check for a whole sale customer and display a notice in the header. This would probably happen in your includes/header.php file or your could use the messageStack feature built into Zencart (gives a notice like when you forget to delete your install directory).

    The code to check for a wholesale customer looks like this. You can change your template to display a notice anywhere you want using this in any file you chose.

    PHP Code:
    if ($_SESSION['customer_id']) {
      
    $customers_id $_SESSION['customer_id'];
        
    $customer_check $db->Execute("select * from " TABLE_CUSTOMERS " where customers_id = '$customers_id'");
     if (
    $customer_check->fields['customers_whole'] != "0") { 
        
    CODE YOU WANT TO USE IF CUSTOMER IS WHOLE SALE


     
    }

    I can't get this code to work. Tried inserting it in tpl_product_info_display to simply output a message -- echo("you are wholesale!"); in place of "CODE YOU WANT..." and it breaks the page.

    It should work anywhere in the code right? Anyone get this to work?

  4. #4
    Join Date
    Jun 2008
    Posts
    3
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Can someone please tell me were I'm to insert

    ALTER TABLE `customers` ADD `customers_whole` VARCHAR( 4 ) DEFAULT '0' NOT NULL;
    ALTER TABLE `products` ADD `products_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `products_price`;
    ALTER TABLE `products_attributes` ADD `options_values_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `options_values_price`;

    in the sqlpatch to make this work and if I'm suppose to copy the files admin & includes into the admin file or into the directory

    I am totally lost with this I thought it was straight forward but I guess not for me

    Thank you

  5. #5
    Join Date
    Feb 2007
    Location
    Earth
    Posts
    116
    Plugin Contributions
    1

    Default Re: DUAL Pricing version 2

    Quote Originally Posted by timbo77 View Post
    Can someone please tell me were I'm to insert

    ALTER TABLE `customers` ADD `customers_whole` VARCHAR( 4 ) DEFAULT '0' NOT NULL;
    ALTER TABLE `products` ADD `products_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `products_price`;
    ALTER TABLE `products_attributes` ADD `options_values_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `options_values_price`;

    in the sqlpatch to make this work and if I'm suppose to copy the files admin & includes into the admin file or into the directory

    I am totally lost with this I thought it was straight forward but I guess not for me

    Thank you
    No problem. In your admin panel navigate to Tools > Install SQL Patches. Copy and paste the patch into the text box then click on "Send" This will update your DB. Please remember that when your updating your site and DB it's good practice to make back ups of both. Especially your DB.

  6. #6
    Join Date
    May 2008
    Posts
    15
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Here Dual Pricing and i am having the following errors

    Code:
    products_id']) ) { if ($val > 0) { $adjust_max = false; $prodId = $key; $qty = $val; $add_max = zen_get_products_quantity_order_max($prodId); $cart_qty = $this->in_cart_mixed($prodId); // $new_qty = $qty; //echo 'I SEE actionMultipleAddProduct: ' . $prodId . '
    '; $new_qty = $this->adjust_quantity($qty, $prodId, 'shopping_cart'); if (($add_max == 1 and $cart_qty == 1)) { // do not add $adjust_max= 'true'; } else { // adjust quantity if needed if (($new_qty + $cart_qty > $add_max) and $add_max != 0) { $adjust_max= 'true'; $new_qty = $add_max - $cart_qty; } $this->add_cart($prodId, $this->get_quantity($prodId)+($new_qty)); } if ($adjust_max == 'true') { // $messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . ' C: - ' . zen_get_products_name($prodId), 'caution'); $messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . zen_get_products_name($prodId), 'caution'); } } } // display message if all is good and not on shopping_cart page if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART) { $messageStack->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCTS, 'success'); } zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } } /** * Method to handle cart Action - notify * * @param string forward destination * @param url parameters */ function actionNotify($goto, $parameters) { global $db; if ($_SESSION['customer_id']) { if (isset($_GET['products_id'])) { $notify = $_GET['products_id']; } elseif (isset($_GET['notify'])) { $notify = $_GET['notify']; } elseif (isset($_POST['notify'])) { $notify = $_POST['notify']; } else { zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page')))); } if (!is_array($notify)) $notify = array($notify); for ($i=0, $n=sizeof($notify); $i<$n; $i++) { $check_query = "select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $check = $db->Execute($check_query); if ($check->fields['count'] < 1) { $sql = "insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $_SESSION['customer_id'] . "', now())"; $db->Execute($sql); } } // zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page')))); zen_redirect(zen_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, zen_get_all_get_params(array('action', 'notify', 'main_page')))); } else { $_SESSION['navigation']->set_snapshot(); zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); } } /** * Method to handle cart Action - notify remove * * @param string forward destination * @param url parameters */ function actionNotifyRemove($goto, $parameters) { global $db; if ($_SESSION['customer_id'] && isset($_GET['products_id'])) { $check_query = "select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $check = $db->Execute($check_query); if ($check->fields['count'] > 0) { $sql = "delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $db->Execute($sql); } zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'main_page')))); } else { $_SESSION['navigation']->set_snapshot(); zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); } } /** * Method to handle cart Action - Customer Order * * @param string forward destination * @param url parameters */ function actionCustomerOrder($goto, $parameters) { global $zco_page; global $messageStack; if ($_SESSION['customer_id'] && isset($_GET['pid'])) { if (zen_has_product_attributes($_GET['pid'])) { zen_redirect(zen_href_link(zen_get_info_page($_GET['pid']), 'products_id=' . $_GET['pid'])); } else { $this->add_cart($_GET['pid'], $this->get_quantity($_GET['pid'])+1); } } // display message if all is good and not on shopping_cart page if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART) { $messageStack->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCT, 'success'); } zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } /** * Method to handle cart Action - remove product * * @param string forward destination * @param url parameters */ function actionRemoveProduct($goto, $parameters) { if (isset($_GET['product_id']) && zen_not_null($_GET['product_id'])) $this->remove($_GET['product_id']); zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } /** * Method to handle cart Action - user action * * @param string forward destination * @param url parameters */ function actionCartUserAction($goto, $parameters) { $this->notify('NOTIFY_CART_USER_ACTION'); } // $qty = $this->adjust_quantity($qty, (int)$products_id, 'shopping_cart'); // temporary fixed on messagestack used for check and message needs better separation function adjust_quantity($check_qty, $products, $message=false) { global $messageStack; $old_quantity = $check_qty; if (QUANTITY_DECIMALS != 0) { // $new_qty = round($new_qty, QUANTITY_DECIMALS); $fix_qty = $check_qty; switch (true) { case (!strstr($fix_qty, '.')): $new_qty = $fix_qty; // $messageStack->add_session('shopping_cart', ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ' - ' . $old_quantity . ' => ' . $new_qty, 'caution'); break; default: $new_qty = preg_replace('/[0]+$/','', $check_qty); // $messageStack->add_session('shopping_cart', 'A: ' . ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ' - ' . $old_quantity . ' => ' . $new_qty, 'caution'); break; } } else { if ($check_qty != round($check_qty, QUANTITY_DECIMALS)) { $new_qty = round($check_qty, QUANTITY_DECIMALS); $messageStack->add_session('shopping_cart', ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ERROR_QUANTITY_CHANGED_FROM . $old_quantity . ERROR_QUANTITY_CHANGED_TO . $new_qty, 'caution'); } else { $new_qty = $check_qty; } } return $new_qty; } } ?> 
    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/wealthuk/public_html/includes/classes/shopping_cart.php:1903) in /home/wealthuk/public_html/includes/functions/sessions.php on line 108
    
    Warning: Cannot modify header information - headers already sent by (output started at /home/wealthuk/public_html/includes/classes/shopping_cart.php:1903) in /home/wealthuk/public_html/admin/includes/init_includes/init_templates.php on line 32
    Here my website
    http://www.joanne-warrick.com

  7. #7
    Join Date
    Jun 2006
    Posts
    85
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Following up on my question above (and still hopefully looking forward to an answer!)... I am wondering something:

    If I'm running ZenCart 1.3.7, should I install a previous version of Dual Pricing? If so, which one? And would I be missing out on important bug fixes if I do that?

    Thanks,
    Adam

  8. #8
    Join Date
    Jan 2007
    Posts
    6
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    I found this answer helpful many times. Hope it works for you.
    https://www.zen-cart.com/tutorials/index.php?article=87

  9. #9
    Join Date
    Jun 2006
    Posts
    85
    Plugin Contributions
    0

    Default Re: DUAL Pricing version 2

    Problem solved - it was as simple as installing the correct version of Dual Pricing - for ZC 1.3.7!

    Truly, it pays to read everything, and to install the appropriate plugin for one's version of ZC.

    Thanks!
    adam

  10. #10
    Join Date
    May 2008
    Location
    Ventura Co.
    Posts
    82
    Plugin Contributions
    1

    help question Re: DUAL Pricing version 2

    So i read through this whole thread and it kinda looks like dual pricing will work for me, but can you clarify that it will do what I need?......

    here goes

    We sell dvds in this store. We are selling to wholesalers and distributors on this site. Another cart is not an option, unfortunatly the company owner wants it only on one.

    I need wholesale pricing to be 12.00 for new products and 10.00 for older titles.
    I need distributor pricing to be 15.00 for new products and 13.00 for older titles.

    The products are the same for both cust types.

    If dual pricing will work cool. if not, any idea what I should i use?

    Thanks for any help here,
    jim

 

 
Page 1 of 2 12 LastLast

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

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