Page 3 of 17 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 163
  1. #21
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Is it possible do not allow quantity discount for whole?
    Yes.

    Turn the display switches off...

    includes/modules/attributes.php
    line 235 - 238
    change this:

    if ($products_options->fields['attributes_qty_prices'] != '' or $products_options->fields['attributes_qty_prices_onetime'] != '') {
    $show_attributes_qty_prices_description = 'true';
    $show_attributes_qty_prices_icon = 'true';
    }

    to this:
    if ($products_options->fields['attributes_qty_prices'] != '' or $products_options->fields['attributes_qty_prices_onetime'] != '') {
    // bof Twitch Wholesale + Attributes TURN OFF quantity discounts
    if ($_SESSION['customers_wholesale']=='1') {
    $show_attributes_qty_prices_description = 'false';
    $show_attributes_qty_prices_icon = 'false';
    } else {
    $show_attributes_qty_prices_description = 'true';
    $show_attributes_qty_prices_icon = 'true';
    }
    // eof Twitch Wholesale + Attributes TURN OFF quantity discounts
    }


    Hide the quantity discounts from wholesale pricing calculation in the cart...

    includes/functions/functions_prices.php
    line 1066 - 1083
    change this:
    ////
    // return attributes_qty_prices or attributes_qty_prices_onetime based on qty
    function zen_get_attributes_qty_prices_onetime($string, $qty) {
    $attribute_qty = preg_split("/[:,]/" , $string);
    $new_price = 0;
    $size = sizeof($attribute_qty);
    // if an empty string is passed then $attributes_qty will consist of a 1 element array
    if ($size > 1) {
    for ($i=0, $n=$size; $i<$n; $i+=2) {
    $new_price = $attribute_qty[$i+1];
    if ($qty <= $attribute_qty[$i]) {
    $new_price = $attribute_qty[$i+1];
    break;
    }
    }
    }
    return $new_price;
    }

    to this:
    ////
    // return attributes_qty_prices or attributes_qty_prices_onetime based on qty
    function zen_get_attributes_qty_prices_onetime($string, $qty) {
    // bof Twitch Wholesale + Attributes TURN OFF quantity discounts
    if ($_SESSION['customers_wholesale']=='1') {
    $new_price = 0;
    return $new_price;
    } else {
    //
    $attribute_qty = preg_split("/[:,]/" , $string);
    $new_price = 0;
    $size = sizeof($attribute_qty);
    // if an empty string is passed then $attributes_qty will consist of a 1 element array
    if ($size > 1) {
    for ($i=0, $n=$size; $i<$n; $i+=2) {
    $new_price = $attribute_qty[$i+1];
    if ($qty <= $attribute_qty[$i]) {
    $new_price = $attribute_qty[$i+1];
    break;
    }
    }
    }
    } // eof Twitch Wholesale + Attributes TURN OFF quantity discounts
    return $new_price;
    }


    Ps: is it possible that twitch wholesale addons have modify special end date calendar, so it don't work for me into chrome and firefox browser, but only into IE?
    No. The calendar is not modified.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  2. #22
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    nothings change...
    maybe I've volume discount in %?

  3. #23
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Quote Originally Posted by 100asa View Post
    nothings change...
    maybe I've volume discount in %?
    I'll need to see your site PM or Post an example of the product you are referring.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  4. #24
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Thanks for the log in info, my last post/fix was to hide product attributes that had quantity discount prices.

    You have quantity discount prices applied to products.

    Here is the fix in bold...


    includes/functions/functions_prices.php
    line 1345 - 1363

    Hide product quantity discounts in shopping cart for wholesale customers:

    ////
    // are there discount quantities
    function zen_get_discount_qty($product_id, $check_qty) {
    global $db;
    // bof Twitch Wholesale + Attributes TURN OFF quantity discounts
    if ($_SESSION['customers_wholesale']=='1') {
    return false;
    } else {

    $product_id = (int)$product_id;

    $discounts_qty_query = $db->Execute("select pqd.*, p.products_discount_type
    from " . TABLE_PRODUCTS_DISCOUNT_QUANTITY . " pqd, " .
    TABLE_PRODUCTS . " p
    where pqd.products_id='" . (int)$product_id . "' and pqd.discount_qty != 0
    and p.products_id = pqd.products_id");
    //echo 'zen_get_discount_qty: ' . $product_id . ' - ' . $check_qty . '<br />';
    if ($discounts_qty_query->RecordCount() > 0 and $check_qty > 0 && $discounts_qty_query->fields['products_discount_type'] !=0) {
    return true;
    } else {
    return false;
    }
    }// eof Twitch Wholesale + Attributes TURN OFF quantity discounts
    }



    includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
    line 158 - 168

    Turn the module off on the product display for wholesale:

    <!--bof Quantity Discounts table -->
    <?php
    // bof Twitch Wholesale + Attributes TURN OFF quantity discounts
    if ($_SESSION['customers_wholesale']=='1') {
    // Do not show product quantity discounts if they exist
    } else {
    ?>


    <?php
    if ($products_discount_type != 0) { ?>
    <?php
    /**
    * display the products quantity discount
    */
    require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php'); ?>
    <?php
    }
    ?>
    <?php } // bof Twitch Wholesale + Attributes TURN OFF quantity discounts ?>
    <!--eof Quantity Discounts table -->
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  5. #25
    Join Date
    Oct 2006
    Location
    Italy
    Posts
    634
    Plugin Contributions
    0

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Works fine! Thank you so much!

  6. #26
    Join Date
    Dec 2013
    Location
    New Zealand
    Posts
    2
    Plugin Contributions
    0

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Hi Twitch, Thanks for the great mod.

    Seems like a silly thing to not be able to find a solution for but, is there a way to have it only display the list price when you are in Wholesale mode?

    Thanks again

  7. #27
    Join Date
    Dec 2013
    Location
    New Zealand
    Posts
    2
    Plugin Contributions
    0

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Actually scratch that, I wasn't thinking simple enough, I have an answer now!

  8. #28
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Quote Originally Posted by makahli View Post
    Hi Twitch, Thanks for the great mod.

    Seems like a silly thing to not be able to find a solution for but, is there a way to have it only display the list price when you are in Wholesale mode?

    Thanks again

    For anyone else with this question, here is one solution that will work:
    includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

    Change this:
    <span class="productsList_price">List Price: $<?php echo $products_list_price; ?></span>
    <!--eof Product Price block -->


    To this:
    <?php if($_SESSION['customers_wholesale'] =='1'){ ?>
    <span class="productsList_price">List Price: $<?php echo $products_list_price; ?></span>
    <?php } ?>
    <!--eof Product Price block -->
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  9. #29
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Great Job! Looking forward to growth in some areas but currently having a bit of confusion. Looked through the informational text files and the coding for wholesale added to the includes/classes/shopping_cart.php around line 614 to no avail.
    When we sell wholesale, we do not charge tax. The buyer is responsible for any taxes when they sell at retail.
    Can't quite get my sleepy head around a way to temporarily set the products_tax_class_id to be 0 or the $products_tax to be $0.00 when logged in as wholesale.
    Suggestions?
    THANX

  10. #30
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,144
    Plugin Contributions
    11

    Default Re: Twitch Wholesale with Twitch Wholesale Attributes

    Another item that I have chosen to "work around" is the requirement to be approved to purchase. We don't have the luxury of someone constantly monitoring for registrations. Someone shopping at 10PM may go 10 hours before approval. In today's world people are standing in front of microwaves and hollering "HURRY UP!"
    I prefer to accept a sale as soon as the person registers and worry later if we need to change the order to wholesale. We'll still require the info for wholesale, we'll just do it a little differently.

 

 
Page 3 of 17 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Twitch Wholesale | Retail Product Control Switch
    By twitchtoo in forum All Other Contributions/Addons
    Replies: 3
    Last Post: 20 Oct 2018, 08:09 PM
  2. v151 Twitch SaleMaker & Specials for Attributes
    By twitchtoo in forum Setting Up Categories, Products, Attributes
    Replies: 20
    Last Post: 26 Jun 2014, 01:41 PM
  3. v151 Twitch TURN OFF SaleMaker & Specials & Discount Coupons for Wholesale Customers
    By twitchtoo in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 26 Dec 2013, 08:52 AM
  4. Need to have wholesale pricing with quantity discounts for wholesale customers only..
    By littleturtlemama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 4
    Last Post: 16 Dec 2010, 04:47 AM
  5. Need to have wholesale pricing with quantity discounts for wholesale customers only..
    By littleturtlemama in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 29 Sep 2007, 10:01 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