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

Twitch Wholesale with Twitch Wholesale Attributes

Views: 27,872

Results 101 to 120 of 164
5 May 2015, 10:27 PM
#101
twitchtoo avatar

twitchtoo

Totally Zenned

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

Twitch Wholesale with Twitch Wholesale Attributes

buildingblocks:

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?

Without seeing the code around the Twitch code block it's possible that the placement is incorrect.

Just to check, when it says add line 35/125 you should be adding one blank line, then pasting in the Twitch code block.

Also be sure to check the location of the file you are changing - is it a** stock ZC override** or your template override?

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

5 May 2015, 11:27 PM
#102
buildingblocks avatar

buildingblocks

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

Without seeing the code around the Twitch code block it's possible that the placement is incorrect.

Just to check, when it says add line 35/125 you should be adding one blank line, then pasting in the Twitch code block.

Also be sure to check the location of the file you are changing - is it a** stock ZC override** or your template override?

I've added the code to the stock zen cart files. As far as I am aware those folders don't do template over-rides? I have added the code to a blank line just above the code that's on the stated number lines. Thanks

includes/modules/order_total/ot_shipping.php

if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
        switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
          case 'national':
            if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
          case 'international':
            if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
          case 'both':
            $pass = true; break;
          default:
            $pass = false; break;
        }
// 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  
        if ( ($pass == true) && ( ($order->info['total'] - $order->info['shipping_cost']) >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
          $order->info['shipping_method'] = $this->title;
          $order->info['total'] -= $order->info['shipping_cost'];
          $order->info['shipping_cost'] = 0;
        }
      }
      $module = (isset($_SESSION['shipping']) && isset($_SESSION['shipping']['id'])) ? substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_')) : '';
      if (is_object(($order)) && zen_not_null($order->info['shipping_method'])) {
        if ($GLOBALS[$module]->tax_class > 0) {
          if (!isset($GLOBALS[$module]->tax_basis)) {
            $shipping_tax_basis = STORE_SHIPPING_TAX_BASIS;
          } else {
            $shipping_tax_basis = $GLOBALS[$module]->tax_basis;
          }

includes/modules/pages/checkout_shipping/header_php.php

// load all enabled shipping modules
  require(DIR_WS_CLASSES . 'shipping.php');
  $shipping_modules = new shipping;

  $pass = true;
  if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
    $pass = false;

    switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
      case 'national':
        if ($order->delivery['country_id'] == STORE_COUNTRY) {
          $pass = true;
        }
        break;
      case 'international':
        if ($order->delivery['country_id'] != STORE_COUNTRY) {
          $pass = true;
        }
        break;
      case 'both':
        $pass = true;
        break;
    }

		// 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  
    $free_shipping = false;
    if ( ($pass == true) && ($_SESSION['cart']->show_total() >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
      $free_shipping = true;
    }
  } else {
    $free_shipping = false;
  }

  require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));

  if (isset($_SESSION['comments'])) {
    $comments = $_SESSION['comments'];
  }


// process the selected shipping method
5 May 2015, 11:37 PM
#103
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:

I've added the code to the stock zen cart files. As far as I am aware those folders don't do template over-rides? I have added the code to a blank line just above the code that's on the stated number lines. Thanks

Looks good, make sure those are uploaded and actually on the server. My live site looks identical and it's working with those inserts.

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

6 May 2015, 1:53 AM
#104
buildingblocks avatar

buildingblocks

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

Looks good, make sure those are uploaded and actually on the server. My live site looks identical and it's working with those inserts.

oh, yes they definitely are uploaded.

28 May 2015, 2:01 PM
#105
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

Sorry, but I've this problems:
1: the amount 9.71 with red arrow, from which mathematical calculation comes out? (italian vat is 22%) Attachment #15323
2: if I push the fuchsia button, zencart show well as the enduser price, as the wholesales price; but if I add to special the product, also the attribute go on special (I would not want this)Attachment #15324

28 May 2015, 2:32 PM
#106
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:

Sorry, but I've this problems:
1: the amount 9.71 with red arrow, from which mathematical calculation comes out? (italian vat is 22%) Attachment #15323
2: if I push the fuchsia button, zencart show well as the enduser price, as the wholesales price; but if I add to special the product, also the attribute go on special (I would not want this)Attachment #15324

Have you installed the updates to get Salemaker and Specials working with Twitch Wholesale?

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

28 May 2015, 2:34 PM
#107
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

No yet. Where're this updates?

28 May 2015, 2:42 PM
#108
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:

No yet. Where're this updates?

https://www.zen-cart.com/downloads.php?do=file&id=1801

You'll see there are some changes that need to be made for the stock zen code to 'see' the wholesale filters/data.

Although the Twitch modules all work together, remember that these add ons may need to be custom coded for YOUR specific wants/needs.

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

28 May 2015, 4:06 PM
#109
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

I've some difficult.
I've just upload the file from https://www.zen-cart.com/downloads.php?do=file&id=1801 (so also me have all the twitch modify to stock zencart 1.5.1) but if I upload the /includes/functions/functions_price.php the wholesale price change to special price (in my case special is more high than wholesale)
Attachment #15326

28 May 2015, 4:39 PM
#110
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

and the file included into https://www.zen-cart.com/downloads.php?do=file&id=1801 are different from edit proposed in txt included
I don't know if I can change the files or apply the modify described into txt included

4 Jun 2015, 5:37 PM
#111
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:

oh, yes they definitely are uploaded.

I'd like to thank **buildingblocks **for access to the problem site and report back on the 'problem'. This site needed additional custom filters added to additional files as a result of the modules and Zen Cart features being used.

You too may need custom coding to integrate this module into your specialized-for-your-business shopping cart. The filters provided in this forum will work, but aren't always enough when you have many modules installed that have also changed the core files... contact your programmer or in this case the guy that built the module ;)

Thanks for your continued support!

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

3 Aug 2015, 1:08 PM
#112
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

How can I exclude only wholesale customers to redeem discount coupon on create account?

4 Aug 2015, 1:56 PM
#113
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:

How can I exclude only wholesale customers to redeem discount coupon on create account?

You'll need to wrap the customers_wholesale switch around the code you want to keep/hide for wholesale customers:

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

--> add code here for wholesale customers to see or leave this blank to hide the code form retail customers

} else {

--> the original zen cart code - for retail customers stays here

**}

**

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

7 Aug 2015, 4:53 PM
#114
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

as you write in post #24, for my 1.5.4 version don't work:
https://www.evernote.com/shard/s272/sh/f41a951a-96dc-40b9-a665-3b64af555c97/034e0ae3715578eedb93932e17481eb9
the single price product is euro 37,80 instead the total order is 215,46 (discount price qty 35,91)
and as you can see the total value order in the cart is different from the box and the template page.

10 Aug 2015, 2:11 PM
#115
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 you write in post #24, for my 1.5.4 version don't work:
https://www.evernote.com/shard/s272/sh/f41a951a-96dc-40b9-a665-3b64af555c97/034e0ae3715578eedb93932e17481eb9
the single price product is euro 37,80 instead the total order is 215,46 (discount price qty 35,91)
and as you can see the total value order in the cart is different from the box and the template page.

That post was related to the code in 1.51 and matching Twitch Wholesale version.

Check that the new Twitch Wholesale for 1.54 has been fit in with the stock zen quantity discounts code in 1.54.

Once you have filtered them correctly the pricing will total the quantity discounts correctly.

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

10 Aug 2015, 4:21 PM
#116
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

That post was related to the code in 1.51 and matching Twitch Wholesale version.

Check that the new Twitch Wholesale for 1.54 has been fit in with the stock zen quantity discounts code in 1.54.

Once you have filtered them correctly the pricing will total the quantity discounts correctly.

Sorry, I'm not understand very well. So, if I not add the code edit as into #24 post, qty discount work well with wholesales (so wholesaler don't have qty discount benefit?) Because my works release of Twitch wholesale is the latest, and is I don't edit files as show in #24 post, qty discount worked also for wholesaler. Now only the shoppint cart is wrong!

10 Aug 2015, 4:44 PM
#117
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:

Sorry, I'm not understand very well. So, if I not add the code edit as into #24 post, qty discount work well with wholesales (so wholesaler don't have qty discount benefit?) Because my works release of Twitch wholesale is the latest, and is I don't edit files as show in #24 post, qty discount worked also for wholesaler. Now only the shoppint cart is wrong!

Then the filters need to be added to the shopping cart calculations also - functions and shopping cart files.

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

10 Aug 2015, 8:45 PM
#118
100asa avatar

100asa

Totally Zenned

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

Re: Twitch Wholesale with Twitch Wholesale Attributes

twitchtoo:

Then the filters need to be added to the shopping cart calculations also - functions and shopping cart files.

Sorry: where? what files? where I can get the code to edit/replace? from your plugin I've already edit the /includes/modules/pages/shopping_cart.php
Maybe other files to edit?

21 Oct 2015, 2:33 PM
#119
davidmay354 avatar

davidmay354

New Zenner

Join Date:
Aug 2010
Posts:
20
Plugin Contributions:
0

Re: Twitch Wholesale with Twitch Wholesale Attributes

Maybe I am just missing it, but is there away to hide certain attributes from reatil customer and only have them appear for wholesale customers?

21 Oct 2015, 2:47 PM
#120
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

davidmay354:

Maybe I am just missing it, but is there away to hide certain attributes from retail customer and only have them appear for wholesale customers?

So product 1 has attribute a1 b2 c3 and you want to hide c3?

Yes it can be hidden.

Small scale - either you add one of the filters already in this thread with the addition of the attribute you want to hide

or

I would need to add a new code based on my other wholesale module - Twitch Wholesale | Retail Product Control Switch to apply to attributes.

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