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

Twitch Wholesale with Twitch Wholesale Attributes

Views: 27,872

Results 81 to 100 of 164
31 Mar 2015, 11:57 PM
#81
luke_galyan avatar

luke_galyan

New Zenner

Join Date:
Jun 2014
Location:
Las Vegas, Nevada, United States
Posts:
47
Plugin Contributions:
0

Twitch Wholesale with Twitch Wholesale Attributes

Just for clarification.......
Should this comment
// when false - keep this module off for retail
actually read
// when false - keep this module off for wholesale?

From the title of this being a wholesale net 30 payment module it shouldn't effect retail customers no matter how the module is set?

Also I went to look for the Wholesale NET 30 payment module, and can not find it. Was curious if it would meet my needs. Where would I find this to look it over more?

Glad to see you are keeping your stuff updated. Inspires confidence!
Luke

1 Apr 2015, 1:33 AM
#82
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

Luke Galyan:

Just for clarification.......
Should this comment
// when false - keep this module off for retail
actually read
// when false - keep this module off for wholesale?

From the title of this being a wholesale net 30 payment module it shouldn't effect retail customers no matter how the module is set?

Also I went to look for the Wholesale NET 30 payment module, and can not find it. Was curious if it would meet my needs. Where would I find this to look it over more?

Glad to see you are keeping your stuff updated. Inspires confidence!
Luke

This is the most important part, understanding how the code works, then setting the switches to work for YOUR needs.

So what the code in my last post is saying:

Turn Wholesale NET 30 payment module on for wholesale customers only.

$this->enabled = ((MODULE_PAYMENT_THIRTY_DAYS_TO_PAY_STATUS == 'True') ? true : false);
- Returns True (this code only operates if it has been installed in the admin/DB = True)

if($_SESSION['customers_wholesale'] >= '1' && $this->enabled==true) // a wholesale customer
- if a wholesale customer logs in (1) and this module is turned on
{
$this->enabled=true; // when true - turn this module on for wholesale
- keep the module on

}else{
$this->enabled=false; // when false - keep this module off for retail
- for every other condition (0) retail or ('') not set - disable the module
}

One must not forget the **admin **'install' button plugs in some of these switches, the live site php then looks at the db and refers back to the php to execute the code. So, the shipping or payment modules once 'installed' in the admin/db are always 'on' or available. These true/false filters could be reversed of course if you want to hide a module from **wholesale and keep it on for retail.

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

1 Apr 2015, 1:43 AM
#83
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

Wholesale NET 30 payment module is a customized **clone **of the Check/Money Order Module... If you need something cloned or customized for your retail or wholesale needs... I hear that Twitch guy is always looking for a challenge ;)

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

9 Apr 2015, 3:35 PM
#84
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

Only now I see little issue: on wholesale page account, my customer add product to cart, and to the wholesales product price "twitch" add option as public price.

9 Apr 2015, 4:51 PM
#85
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

Why to have properly wholesale price discount price button must to have ticked?

10 Apr 2015, 7:05 AM
#86
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:

Only now I see little issue: on wholesale page account, my customer add product to cart, and to the wholesales product price "twitch" add option as public price.

If a wholesale customer can see the retail price in their cart, this module has not been installed correctly. It's likely one of the files related to the shopping cart has not been updated correctly or didn't get uploaded to the server.

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

10 Apr 2015, 7:08 AM
#87
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:

Why to have properly wholesale price discount price button must to have ticked?

I'm not certain what you're attempting to do here, Twitch WS pricing is not controlled by switches it's hard coded.

I'm uncertain which 'discount' module you are trying to apply to the wholesale price?

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

10 Apr 2015, 7:53 PM
#89
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:

As I say in #13 post, if I don't tick at least the "discount" button, my wholesale customer don't the the addiction priced as wholesale
https://www.evernote.com/shard/s272/sh/14ca85aa-024e-468f-94c4-74af8c5edc83/bd10069e59678c3d5d97adeb7e8ac7f0

There has to be other switches turned on that cause this scenario to happen. Wholesale is statically pulling the price only from the wholesale field in the database. Either your install of Twitch Wholesale has other modifications to it, sales, specials or pricing changes or there's a selection of code missing from the installation.

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

10 Apr 2015, 9:30 PM
#90
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

all yours script works fine for me: only wholesale attribute price have this little issue (so in admin I must tick the discounted option)
Where do you think I can look to show the issue?

10 Apr 2015, 10:23 PM
#91
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:

all yours script works fine for me: only wholesale attribute price have this little issue (so in admin I must tick the discounted option)
Where do you think I can look to show the issue?

I would need to see the live site and all of the settings one product with attributes is using, then track down the conditions that cause this, then check the code.

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

11 Apr 2015, 1:11 PM
#92
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

Sub-Total Display Bug when Products Priced by Attribute is ON

Problem
When products priced by attribute the sub-total in the** shopping cart ***and *shopping cart sidebox do not display the correct price - totals include the retail price instead of wholesale price.

Solution
The cart calculation has always been correct, however the sub-total display not so much, so lets change them...

includes/classes/shopping_cart.php

**REPLACE **line 697
$products_price = $product->fields['products_price'];

with this:

// bof Twitch Wholesale + Att - Sub-Total price in shopping cart for main calculation display when product priced by attributes
    //    $products_price = $product->fields['products_price'];
    if($_SESSION['customers_wholesale'] =='1'){
    $products_price = $product->fields['products_price_w'];
    } else {
    $products_price = $product->fields['products_price'];
    }
// eof Twitch Wholesale + Att - Sub-Total price in shopping cart for main calculation display when product priced by attributes

And while we are at it, lets make sure all the other pricing is up to date...

REPLACE line 725-726
// calculate Product Price without Specials, Sales or Discounts
$total_before_discounts += $product->fields['products_price'];

with this:

        // calculate Product Price without Specials, Sales or Discounts
        // bof Twitch Wholesale + Att
        if($_SESSION['customers_wholesale'] =='1'){
        $total_before_discounts += $product->fields['products_price_w'];
        } else {
        $total_before_discounts += $product->fields['products_price'];
        }
        // eof Twitch Wholesale + Att

This fix will is backwards compatible with previous versions of Twitch WS + ATT (line numbers will be off a bit) and will be included in the next release.

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

24 Apr 2015, 2:31 AM
#93
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Hi

Will the Twitch Wholesale with Twitch Wholesale Attributes module and Twitch Restrict Categories by Customer or Group module work together?

Also considering that 'Twitch Wholesale with Twitch Wholesale Attributes' provides

  • guest/retail/wholesale login and independent landing/index pages for each
  • wholesale filters for product pricing, attribute pricing and display purposes

is it unnecessary to have both installed?

thanks

24 Apr 2015, 4:57 AM
#94
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

Will the Twitch Wholesale with Twitch **Wholesale **Attributes module and Twitch **Restrict **Categories by Customer or Group module work together?
-> Yes

Also considering that 'Twitch **Wholesale **with Twitch Wholesale Attributes' provides

  • guest/retail/wholesale login and independent landing/index pages for each - Yes
  • wholesale filters for product pricing, attribute pricing and display purposes - Yes

is it unnecessary to have both installed?
- Depends on your needs...

Twitch Wholesale needs to be installed first.

  • Retail and Wholesale splits after login
  • Each product/attribute has a retail price and a wholesale price
  • The site operates as is unless you turn on the filters you need which are available on the forum or you can ask me for help.
  • Out of the box all payment, shipping and order total modules remain unfiltered.

Customer Flow Twitch WS + ATT
Guest/Retail
guest - cart - retail experience - signup - default to retail account.
now customer can log in - see retail landing page/index - only retail prices

Guest/Wholesale
guest - cart - retail experience - signup - default to retail account.
customer currently must contact you to request wholesale or you can setup a wholesale request checkbox/application page to handle this yourself.
once approved by admin existing retail customer switched to wholesale.
now customer can log in - see wholesale landing page/index - only wholesale prices

If you want to restrict wholesale from any particular payment, shipping or order total you must install the appropriate filter.
For example, retail could be charged sales tax while wholesale is not charged sales tax.


Twitch Restrict
This is used to create** customer groups **(catgroup) that are then applied to your categories.

This restricts access to various categories or groups together particular products based on the customer or group.
Customer 1 - can see all categories marked 0 - Everyone with no catgroup assignment
- this customer can not see anything in CatGroup12 or CatGroup9

Customer 2 - can see all categories marked 0 - Everyone and CatGroup12 - a category full of products packaged in bulk only available to wholesale customers
- this customer can not see anything in CatGroup9

Customer 3 - can see all categories marked 0 - Everyone and CatGroup9 - a category full of promotional products for retail store displays
- this customer can not see anything in CatGroup12

This module was designed to use along with Twitch Wholesale but doesn't need any of the code related to it. This means you can create category restrictions on any Zen Cart. It also means you can plug it in with little effort (line numbers will be off a bit related to the installation of TwitchWS) and take advantage of the retail/wholesale split pricing. Each product within the CatGroup's would have a** wholesale and retail price**.


Which brings us to the new module you didn't mention...
**
Twitch Wholesale | Retail Product Control Switch

This is a product level switch. It currently uses the Twitch Wholesale + Attributes switch to see** customer type**.

Installed and filtered at the product level throughout the site, this switch has three positions:
Switch position 0 = Retail (default)
Switch position 1 = Wholesale
Switch position 2 = **Both

**Controlled from the admin product page this switch restricts access to retail/wholesale relative to it's position and the type of customer you are for example:

Guest - sees all retail products with retail prices

Customer 1 - Retail Logged In - sees all retail products with retail prices
- sees any products set for BOTH with retail prices* only***

Customer 2 - Wholesale Logged In - sees all wholesale products with wholesale prices
- sees any products set for BOTH with wholesale prices* only***

More info and pics here:
https://www.zen-cart.com/showthread.php?216976-Twitch-Wholesale-Retail-Product-Control-Switch


Custom Coding
All of the Twitch modules are coded to work together alongside the stock Zen Cart Group Pricing and Customer Authorization modules/controls. It's important to know exactly how you want your admin/live site to work and only install the modules/controls you need.

Also know that each of the Twitch modules can be, and lately have been coded to point at/work with each other, Zen Cart modules, 3rd party modules or rewritten entirely to serve a very specific purpose - mostly because I enjoy coding that much :)

*Recent Examples: *
**1 **- You could use Twitch Wholesale to allow Guest/Retail to run on the number 0, then add pricing tiers - Wholesale 1, Wholesale 2, Wholesale 3.

**2 **- Twitch Restrict could be used to split any cart into category groups with or without Twitch WS.
CatGroup1 - Retail Products
CatGroup2 - Wholesale Products
CatGroup3 - Non Licensed Products
CatGroup4 - Licensed Products

**3 **- Twitch Product Control - Installed with or without Twitch WS.
Switch position 0 = Non Licensed
Switch position 1 = Licensed
Switch position 2 = OFF

If you have more questions feel free to ask on the forum or email me directly.

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

24 Apr 2015, 9:35 PM
#95
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Thanks for taking the time on such a detailed response! I will be referring back to it.

1 May 2015, 5:03 AM
#96
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Hi

I have the twitch wholesale mod installed on a dev site. So far so good. I have cloned the money order module and called it 'bill me through paypal'. I have also cloned the walk in module and called it 'Bill shipping separately'. Is there a way to offer 'bill me through paypal' and 'bill shipping separately' as the only payment and shipping options for wholesale customers, But exclude those two options from retail customers?

Retail customers have paypal pro and authorizenet as payment options and have usps as shipping option. The freeshipper is also turned on and I recall something being said about free shipping so I have to go back and read that again.

1 May 2015, 1:51 PM
#97
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

buildingblocks - Yes, please review post #80 and #82 of this thread for payment module filters.

You will insert the 'code' name of the module, then review the switch positions as explained in post #82 - True or False based on your needs.

Please review post #75 and #76 of this thread for shipping module filters.

Same here, replace the name of the module to relate to the shipping module you are using, then set the True or False switch to suite your needs.

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

4 May 2015, 10:42 PM
#98
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

Turn off free shipping for wholesale customers when using Order Total Module in admin:

includes/modules/order_total/ot_shipping.php

add in line 35:

// bof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
if($_SESSION['customers_wholesale'] >= '1') // a wholesale customer
{
$pass = false; // when false - turn this module off
}
// eof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option

> 
> 
> **includes/modules/pages/pages/checkout_shipping/header_php.php**
> 
> ***add in line 125:***
> ```php
// bof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option
if($_SESSION['customers_wholesale'] >= '1') // a wholesale customer
{
        $pass = false; // when false - turn this module off
}
// eof Twitch Free Shipping - Order Total - Wholesale Filter - Mar.22.2015 if customer belongs to wholesale do not show this shipping option

This will prevent wholesale customers from receiving Free Shipping For Orders Over discounts.

can't figure why this is not working for me. My two files, header_php.php and ot_shipping.php are identical to a fresh zen cart 1.5.3 file set. I placed the provided code at the specified areas. There was code on those lines already so I placed the new code just above it. I have removed and reinstalled the ot_shipping module and still the, free shipping above "specified amount", is available for wholesale customers. The new codes provided for each file is the same....is that correct?

5 May 2015, 7:48 PM
#99
richardtuttle avatar

richardtuttle

New Zenner

Join Date:
Dec 2011
Location:
Boise, ID
Posts:
28
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

With this mod, is it possible to NOT apply/offer certain attributes to the wholesale customer?

5 May 2015, 10:23 PM
#100
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

richardtuttle:

With this mod, is it possible to NOT apply/offer certain attributes to the wholesale customer?

This currently needs to be custom coded for attributes.

I have added 'Twitch Wholesale | Retail Attribute Control Switch' to the features list for the next release/new module release.

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