Forums / All Other Contributions/Addons / Twitch Wholesale with Twitch Wholesale Attributes

Twitch Wholesale with Twitch Wholesale Attributes

Views: 27,872

Results 21 to 40 of 164
21 Jan 2014, 4:25 PM
#21
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

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.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

21 Jan 2014, 5:44 PM
#22
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

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

21 Jan 2014, 5:52 PM
#23
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

100asa:

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.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

22 Jan 2014, 3:58 PM
#24
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

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.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

22 Jan 2014, 4:13 PM
#25
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Works fine! Thank you so much!

21 Feb 2014, 8:54 AM
#26
makahli avatar

makahli

New Zenner

Join Date:
Dec 2013
Location:
New Zealand
Posts:
2
Plugin Contributions:
0

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

21 Feb 2014, 9:04 AM
#27
makahli avatar

makahli

New Zenner

Join Date:
Dec 2013
Location:
New Zealand
Posts:
2
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

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

21 Feb 2014, 1:00 PM
#28
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

makahli:

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.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 May 2014, 9:48 AM
#29
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

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.:frusty:
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

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 May 2014, 10:01 AM
#30
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

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.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 May 2014, 10:03 AM
#31
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Twitch Wholesale with Twitch Wholesale Attributes

And finally on tonight's list, I'd like to be able to charge shipping (doesn't matter whether flat rate, USPS, or UPS) to just the wholesale folks. Shipping is factored into the retail price.
THANX

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

6 May 2014, 2:27 PM
#32
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

dbltoe:

And finally on tonight's list, I'd like to be able to charge shipping (doesn't matter whether flat rate, USPS, or UPS) to just the wholesale folks. Shipping is factored into the retail price.
THANX

You can add the wholesale filter to each shipping module you would like. It's easy breezy.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 May 2014, 2:30 PM
#33
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

dbltoe:

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.

There's no need to worry about the authorization, you're welcome to let them sign up on the fly. You can change their account to wholesale at any time, however if they have placed an order, that order will be a record of the type of account they had at the time. It's not too difficult to change their wholesale account status, remake the order and delete the old 'retail' order... just be sure to click the 'restock products' checkbox if you're tracking stock :)

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

6 May 2014, 2:31 PM
#34
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

dbltoe:

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.:frusty:
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

You need to add the wholesale filter to the tax module so instead of doing any tax calculations it completely bypasses the module. There's an example i'm certain will work where you see the customers_wholesale filter in an if statement then true or false. Just like the shipping and payment modules.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

7 May 2014, 7:29 PM
#35
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,857
Plugin Contributions:
18

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

You need to add the wholesale filter to the tax module so instead of doing any tax calculations it completely bypasses the module. There's an example i'm certain will work where you see the customers_wholesale filter in an if statement then true or false. Just like the shipping and payment modules.
Here's what we did to turn off tax for the wholesale customer. Got a better idea?

      /*********************************************
       * Calculate taxes for this product
       *********************************************/
      $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
      + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
      $this->info['subtotal'] += $shown_price;
      $this->notify('NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE', array('shown_price'=>$shown_price));
      // find product's tax rate and description
      $products_tax = $this->products[$index]['tax'];
      $products_tax_description = $this->products[$index]['tax_description'];

      if (DISPLAY_PRICE_WITH_TAX == 'true') {
        // calculate the amount of tax "inc"luded in price (used if tax-in pricing is enabled)
        $tax_add = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
      } else {
        // calculate the amount of tax for this product (assuming tax is NOT included in the price)
//        $tax_add = zen_round(($products_tax / 100) * $shown_price, $currencies->currencies[$this->info['currency']]['decimal_places']);
        $tax_add = ($products_tax/100) * $shown_price;
      }
      $this->info['tax'] += $tax_add;
      foreach ($taxRates as $taxDescription=>$taxRate)
      {
        $taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
                +  zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);
        if (isset($this->info['tax_groups'][$taxDescription]))
        {
          $this->info['tax_groups'][$taxDescription] += $taxAdd;
        } else
        {
          $this->info['tax_groups'][$taxDescription] = $taxAdd;
        }
      }
      /*********************************************
       * END: Calculate taxes for this product
       *********************************************/
```became```php
      /*********************************************
       * Calculate taxes for this product
       *********************************************/
      $shown_price = (zen_add_tax($this->products[$index]['final_price'] * $this->products[$index]['qty'], $this->products[$index]['tax']))
      + zen_add_tax($this->products[$index]['onetime_charges'], $this->products[$index]['tax']);
      $this->info['subtotal'] += $shown_price;
      $this->notify('NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE', array('shown_price'=>$shown_price));
      // find product's tax rate and description
      $products_tax = $this->products[$index]['tax'];
      $products_tax_description = $this->products[$index]['tax_description'];

    if($_SESSION['customers_wholesale'] =='1'){
        $products_tax  = 0 ;
        $this->products[$index]['tax'] = 0;
        $tax_add = 0;
        $this->products[$index]['tax_description'] = '';
        }

    if($_SESSION['customers_wholesale'] =='0'){


      if (DISPLAY_PRICE_WITH_TAX == 'true') {
        // calculate the amount of tax "inc"luded in price (used if tax-in pricing is enabled)
        $tax_add = $shown_price - ($shown_price / (($products_tax < 10) ? "1.0" . str_replace('.', '', $products_tax) : "1." . str_replace('.', '', $products_tax)));
      } else {
        // calculate the amount of tax for this product (assuming tax is NOT included in the price)
//        $tax_add = zen_round(($products_tax / 100) * $shown_price, $currencies->currencies[$this->info['currency']]['decimal_places']);
        $tax_add = ($products_tax/100) * $shown_price;
      }
      $this->info['tax'] += $tax_add;
      foreach ($taxRates as $taxDescription=>$taxRate)
      {
        $taxAdd = zen_calculate_tax($this->products[$index]['final_price']*$this->products[$index]['qty'], $taxRate)
                +  zen_calculate_tax($this->products[$index]['onetime_charges'], $taxRate);
        if (isset($this->info['tax_groups'][$taxDescription]))
        {
          $this->info['tax_groups'][$taxDescription] += $taxAdd;
        } else
        {
          $this->info['tax_groups'][$taxDescription] = $taxAdd;
        }
      }
    }
      /*********************************************
       * END: Calculate taxes for this product
       *********************************************/

THANX

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

7 May 2014, 9:43 PM
#36
haredo avatar

haredo

Totally Zenned

Join Date:
Apr 2006
Location:
Texas
Posts:
6,187
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Twitch,
Trying to write the code to eliminate the Free Shipping on the Wholesale Account to only show UPS and USPS ...

includes/modules/shipping/ups.php

function ups() {
    global $order, $db, $template, $current_page_base;

    $this->code = 'ups';
    $this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
    $this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
    $this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
    $this->icon = $template->get_template_dir('shipping_ups.gif', DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . 'shipping_ups.gif';
    $this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
    $this->tax_basis = MODULE_SHIPPING_UPS_TAX_BASIS;

    // disable only when entire cart is free shipping
    if (zen_get_shipping_enabled($this->code)) {
      $this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
    }

    if ($this->enabled) {
      // check MODULE_SHIPPING_UPS_HANDLING_METHOD is in
      $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_UPS_HANDLING_METHOD'");
      if ($check_query->EOF) {
        $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_UPS_HANDLING_METHOD', 'Box', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\'Order\', \'Box\'), ', now())");
      }
    }

    if ( ($this->enabled == true) && ((int)MODULE_SHIPPING_UPS_ZONE > 0) ) {
      $check_flag = false;
      $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
      while (!$check->EOF) {
        if ($check->fields['zone_id'] < 1) {
          $check_flag = true;
          break;
        } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
          $check_flag = true;
          break;
        }
        $check->MoveNext();
      }

      if ($check_flag == false) {
        $this->enabled = false;
      }
    }

    $this->types = array('1DM' => 'Next Day Air Early AM',
                         '1DML' => 'Next Day Air Early AM Letter',
                         '1DA' => 'Next Day Air',
                         '1DAL' => 'Next Day Air Letter',
                         '1DAPI' => 'Next Day Air Intra (Puerto Rico)',
                         '1DP' => 'Next Day Air Saver',
                         '1DPL' => 'Next Day Air Saver Letter',
                         '2DM' => '2nd Day Air AM',
                         '2DML' => '2nd Day Air AM Letter',
                         '2DA' => '2nd Day Air',
                         '2DAL' => '2nd Day Air Letter',
                         '3DS' => '3 Day Select',
                         'GND' => 'Ground',
                         'GNDCOM' => 'Ground Commercial',
                         'GNDRES' => 'Ground Residential',
                         'STD' => 'Canada Standard',
                         'XPR' => 'Worldwide Express',
                         'XPRL' => 'Worldwide Express Letter',
                         'XDM' => 'Worldwide Express Plus',
                         'XDML' => 'Worldwide Express Plus Letter',
                         'XPD' => 'Worldwide Expedited',
                         'WXS' => 'Worldwide Saver');
  }
  /**
   * Get quote from shipping provider's API:
   *
   * @param string $method
   * @return array of quotation results
   */
  function quote($method = '') {
    global $_POST, $order, $shipping_weight, $shipping_num_boxes;

    if ( (zen_not_null($method)) && (isset($this->types[$method])) ) {
      $prod = $method;
      // BOF: UPS USPS
    } else if ($order->delivery['country']['iso_code_2'] == 'CA') {
      $prod = 'STD';
      // EOF: UPS USPS
    } else {
      $prod = 'GNDRES';
    }

    if ($method) $this->_upsAction('3'); // return a single quote

    $this->_upsProduct($prod);

if (zen_get_shipping_enabled($this->code)) {
if (!$_SESSION['customers_wholesale'] == 1) {} else {
$this->enabled = ((MODULE_SHIPPING_UPS_STATUS == 'True') ? true : false);
}
}

Having problems, what you think?

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.

Zen Cart Certified hosting at myZenCartHost.com.

8 May 2014, 8:57 PM
#37
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

This has been working for many years to shut off shipping and payment modules:

// bof Twitch April 7th - if retail customer do not show this shipping option
$this->enabled = ((MODULE_SHIPPING_FLATCLONE_STATUS == 'True') ? true : false);
if($_SESSION['customers_wholesale']=='1' && $this->enabled==true) // a wholesale customer
{
$this->enabled=false; // when true - turn this module off
}else{
$this->enabled=true; // when false - keep this module on
}
// eof Twitch April 7th - if retail customer do not show this shipping option

There are many ways of manipulating the filter to shut down the module.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

14 Aug 2014, 2:06 PM
#38
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

Great News!!

I've completed the updates to Twitch Wholesale with Wholesale Attributes for Zen Cart 1.53.

I will be compiling the fileset and releasing the complete package on my site and to the Zen Plugins later today.

More good news... Anyone upgrading:

ZC 1.51 + Twitch WS+ATT 13.a - Oct 13.2013

to

ZC 1.53 + Twitch WS +ATT 14.b - August 10.2014

the filters you may be using in other pages/modules will continue to work as long as you copy them to your new ZC 1.53 install in the same locations within the code/file.

This package is designed solely to work with 1.53, if you are using 1.51 use Twitch WS+ATT 13.a - Oct 13.2013 the last complete and stable version for 1.51.

Thanks to all that support myself and my family.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

19 Aug 2014, 7:55 PM
#39
twitchtoo avatar

twitchtoo

Totally Zenned

Join Date:
Apr 2007
Location:
Ontario, Canada
Posts:
1,733
Plugin Contributions:
14

Re: Twitch Wholesale with Twitch Wholesale Attributes

Now available for download at twitchtoo:

**NEW **- Twitch Wholesale with Wholesale Attributes for Zen Cart 1.53

Once approved the .zip will be available in ZC Plugins for 1.53

Please use the forum if you have any questions, feature requests or bug reports or contact me directly.

Twitch.
https://www.twitchtoo.com Do you work for free? Please donate.
June 7.2026 - NOW AVAILABLE - Twitch Base8 - Obsidian

3 Oct 2014, 3:49 PM
#40
purecarsound avatar

purecarsound

New Zenner

Join Date:
May 2006
Location:
Chester, UK
Posts:
99
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Hi.

Wonder if someone can help. I'm using Zen 1.5.3 with Sheffield Blue Responsive Template installed.

I've been checking some of the install files using WinMerge to make sure I don't overwrite anything already installed but I'm struggling with the following as there are so many differences:-

Is someone able to assist as to what I need to add to the file to ensure this Plugin works ok?

The /includes/templates/Your_Template/common/tpl_header.php

My current tpl_header.php is as follows:-

<?php
/**
 * Common Template - tpl_header.php
 *
 * this file can be copied to /templates/your_template_dir/pagename<br />
 * example: to override the privacy page<br />
 * make a directory /templates/my_template/privacy<br />
 * copy /templates/templates_defaults/common/tpl_footer.php to /templates/my_template/privacy/tpl_header.php<br />
 * to override the global settings and turn off the footer un-comment the following line:<br />
 * <br />
 * $flag_disable_header = true;<br />
 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_header.php 4813 2006-10-23 02:13:53Z drbyte $
 */
?>

<?php
  // Display all header alerts via messageStack:
  if ($messageStack->size('header') > 0) {
    echo $messageStack->output('header');
  }
  if (isset($_GET['error_message']) && zen_not_null($_GET['error_message'])) {
  echo htmlspecialchars(urldecode($_GET['error_message']));
  }
  if (isset($_GET['info_message']) && zen_not_null($_GET['info_message'])) {
   echo htmlspecialchars($_GET['info_message']);
} else {

}
?>


<!--bof-header logo and navigation display-->
<?php
if (!isset($flag_disable_header) || !$flag_disable_header) {
?>

<div id="headerWrapper">

<!--bof-display today date and time-->

<?php

echo date('l jS F Y - h:ia');

?>

<!--eof-display today date and time-->


<!--bof-branding display-->
<div id="logoWrapper">
    <div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>
<?php if (HEADER_SALES_TEXT != '' || (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2))) { ?>
    <div id="taglineWrapper">
<?php
              if (HEADER_SALES_TEXT != '') {
?>
      <div id="tagline"><?php echo HEADER_SALES_TEXT;?></div></div>
<br class="clearBoth" />
<?php
              }
?>
<?php
              if (SHOW_BANNERS_GROUP_SET2 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET2)) {
                if ($banner->RecordCount() > 0) {
?>
      <div id="bannerTwo" class="banners"><?php echo zen_display_banner('static', $banner);?></div>
<?php
                }
              }
?>
    </div>

<?php } // no HEADER_SALES_TEXT or SHOW_BANNERS_GROUP_SET2 ?>


</div>

<br class="clearBoth" />
<!--eof-branding display-->



<!--bof-navigation display-->
<div id="navMainWrapper">
<div id="navMain">
    <ul class="back">
    <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo HEADER_TITLE_CATALOG; ?></a> | </li>
<?php if ($_SESSION['customer_id']) { ?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a> | </li>
    <li><a href="<?php echo zen_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a> | </li>
<?php
      } else {
        if (STORE_STATUS == '0') {
?>
    <li><a href="<?php echo zen_href_link(FILENAME_LOGIN, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGIN; ?></a> | </li>
<?php } } ?>
    <li><img src="<?php  echo $template->get_template_dir('',DIR_WS_TEMPLATE, $current_page_base,'images').'/'.HEADER_ICON_CART ?>" alt="cart icon" class="cart-icon"  /><a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>"><?php echo $_SESSION['cart']->count_contents();?> <?php echo HEADER_TITLE_CART_ITEMS; ?> - <?php echo $currencies->format($_SESSION['cart']->show_total());?></a> | </li>
    <li><a href="<?php echo zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'); ?>"><?php echo HEADER_TITLE_CHECKOUT; ?></a></li>
<?php if ($_SESSION['cart']->count_contents() != 0) { ?>
<?php }?>
</ul>
<br class="clearBoth" />
</div>



<div id="header-lan-curr">
<?php require(DIR_WS_MODULES . 'sideboxes/languages_header.php'); ?>
<?php require(DIR_WS_MODULES . 'sideboxes/currencies_header.php'); ?>
<div class="clearBoth"></div>
</div>


</div>
<!--eof-navigation display-->

<div id="navMainSearch"><?php require(DIR_WS_MODULES . 'sideboxes/search_header.php'); ?></div>



<!--eof-header logo and navigation display-->

<!--bof-optional categories tabs navigation display-->
<?php require($template->get_template_dir('tpl_modules_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_categories_tabs.php'); ?>
<!--eof-optional categories tabs navigation display-->

<!--bof-header ezpage links-->
<?php if (EZPAGES_STATUS_HEADER == '1' or (EZPAGES_STATUS_HEADER == '2' and (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])))) { ?>
<?php require($template->get_template_dir('tpl_ezpages_bar_header.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_ezpages_bar_header.php'); ?>
<?php } ?>
<!--eof-header ezpage links-->
</div>

<br class="clearBoth" />

<!--bof-mega menu display-->
   <?php require($template->get_template_dir('tpl_mega_menu.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_mega_menu.php');?>
<!--eof-mega menu display-->
<div class="clearBoth"></div>

<div class="clearBoth"></div>

<!--bof handheld menu display-->
<?php require($template->get_template_dir('tpl_modules_mobile_categories_tabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_mobile_categories_tabs.php'); ?>
<!--eof handheld menu display-->
<div class="clearBoth"></div>




<?php
    if ($this_is_home_page) {
?>
 <?php
    if (RSB_SLIDES_STATUS == 'true') {
?>
      <?php require($template->get_template_dir('tpl_home_slider.php',DIR_WS_TEMPLATE, $current_page_base,'common')
            . '/tpl_home_slider.php');?>
<?php
    } ?>
<?php
    } ?>






<?php } ?>