Zen Cart Logo

DUAL Pricing v2

Views: 363,359

Results 681 to 700 of 1,504
12 Jan 2011, 8:11 PM
#681
rayring avatar

rayring

New Zenner

Join Date:
Dec 2008
Posts:
21
Plugin Contributions:
0

DUAL Pricing v2

Hi Everyone,

Just spent 3 hours of browsing through forums for the answer of one simple question:

Is it possible with this dual pricing mod to display the wholesale prices without taxes. While the retail prices are shown with taxes?

This question has been asked several times on different forums but there is no clear answer on this.

Thanks in advance :bigups:

13 Jan 2011, 5:46 AM
#682
townsend2009 avatar

townsend2009

New Zenner

Join Date:
Nov 2008
Posts:
93
Plugin Contributions:
0

Re: DUAL Pricing v2

I too cannot get this to work with the latest version:
Zen Cart 1.3.9h

1.6 worked great then I upgrade which of course wiped it all out...it was okay since I found that the mod was updated to 1.7 but the instructions aren't clear to install and it's not changing anything when I upload and install. Hmmm...I'll be watching this thread. I really LOVE this mod. :D

13 Jan 2011, 9:05 AM
#683
supersnow avatar

supersnow

Zen Follower

Join Date:
Apr 2007
Location:
California, USA
Posts:
233
Plugin Contributions:
0

Re: DUAL Pricing v2

townsend2009:

I too cannot get this to work with the latest version:
Zen Cart 1.3.9h

1.6 worked great then I upgrade which of course wiped it all out...it was okay since I found that the mod was updated to 1.7 but the instructions aren't clear to install and it's not changing anything when I upload and install. Hmmm...I'll be watching this thread. I really LOVE this mod. :D

Not sure what trouble you are having but I installed this and I couldn't for the life of me work out the problem with my attributes controller then I did a quick winmerge of the admin/attributes_controller.php and realized that this mod needed an updated version to work with 1.3.9h

It was missing ```

<?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>

I hope this helps - this made it work on my store (cross the fingers there is no other issues)

I have attached my version if anyone can use it!
15 Jan 2011, 2:45 PM
#684
zl_conquistador avatar

zl_conquistador

New Zenner

Join Date:
Nov 2010
Location:
Ohio
Posts:
31
Plugin Contributions:
0

Re: DUAL Pricing v2

supersnow:

Not sure what trouble you are having but I installed this and I couldn't for the life of me work out the problem with my attributes controller then I did a quick winmerge of the admin/attributes_controller.php and realized that this mod needed an updated version to work with 1.3.9h

It was missing ```

<?php echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']); ?>
>  
> I hope this helps - this made it work on my store (cross the fingers there is no other issues)
>  
> I have attached my version if anyone can use it!
 
Is it still working? I'm very interested in this mod :cool:
15 Jan 2011, 7:46 PM
#685
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

Major Big Bug Fix here!

the variable 'customers_whole' was not consistently written throughout the current install package for 1.3.9h!!!

there are two ways to correct this, by doing a find for the words 'customer_whole' and replacing it with 'customers_whole' (plural)

or

follow the list i made below:

includes/functions/functions_prices.php

from line 120
// is there a products_price to add to attributes
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
// is there a products_price to add to attributes
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];

from line 154
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];

from line 1302
if ($_SESSION['customer_whole']) {
if ($_SESSION['customer_whole'] != '0') {
$i = (int)$_SESSION['customer_whole'];
to:
if ($_SESSION['customers_whole']) {
if ($_SESSION['customers_whole'] != '0') {
$i = (int)$_SESSION['customers_whole'];

includes/modules/products_quantity_discounts.php

from line 101
// percentage discount
case '1':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// percentage discount
case '1':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 107
if (!$display_specials_price) {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
if (!$display_specials_price) {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 118
// actual price
case '2':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// actual price
case '2':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 134
// amount offprice
case '3':
if ($products_discount_type_from == '0') {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
// amount offprice
case '3':
if ($products_discount_type_from == '0') {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 143
if (!$display_specials_price) {
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {
to:
if (!$display_specials_price) {
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

includes/modules/pages/login/header_php.php

from line 90
$_SESSION['customer_whole'] = $check_customer->fields['customers_whole'];
to:
$_SESSION['customers_whole'] = $check_customer->fields['customers_whole'];

**includes/templates/YOUR_TEMPLATE_NAME_HERE/templates/tpl_product_info_display.php
**
**from line 69
**if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {

to:

if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

from line 84
if ($_SESSION['customer_whole'] && $_SESSION['customer_whole'] != '0' ) {

to:
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {

there are more bugs i have fixes for i will post shortly, the cart will now see the wholesale customer as well as the prices for a wholesale customer!

Twitch

15 Jan 2011, 10:49 PM
#686
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

**Scrap the above post #685! I have finally FINALLY found the source of the problem!
**
I will post the correct install.sql, and all of the changes required to make the cart not only see the wholesale customer, but use the correct pricing AND allow the admin to see and control the customer type. Now working in 1.3.9h!!!

Twitch

16 Jan 2011, 1:09 AM
#687
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

Ok, here it is, step by step installation, bug fix and testing!

Install instructions for Dual Pricing - Wholesale Pricing v1.9t

This version works on ZenCart 1.3.9.h as of Jan 15th 2011

**I'm not responsible for anything you do to your ZenCart, please backup your files and your database... in two locations.
**
Step 1 - download and extract
'dual_pricing_wholesale_pricing_1-7c.zip

located here:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_61&products_id=166

DO NOT use the install.sql.
Instead use the following SQL patch:

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;
ALTER TABLE products_discount_quantity ADD discount_price_w VARCHAR( 150 ) DEFAULT '0' AFTER discount_price;
ALTER TABLE customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL AFTER customers_wholesale;


Step 2 - rename the 'control' folder to the name of your 'admin' folder.

Step 3 (Optional) - rename 'template_default' with the name of the template you are currently using.
Note: this will prevent overwriting the original Zen Cart core template file.

Step 4 - merge the new 'admin' folder and the 'includes' folder with your ZenCart install.

Step 5 (Optional) - download and unzip the attributes controller found here:
http://www.zen-cart.com/forum/showpost.php?p=982236&postcount=683

**attributes_controller.zip **
from: supersnow

Step 6 (Optional) - merge 'attributes_controller.php' to admin/attributes_controller.php in your ZenCart install.

Step 7 - You must first replace all instances of 'customer_whole' and 'customer_wholesale' with 'customers_whole' and 'customers_wholesale'

Step 8 - Replace all 'customers_whole" with 'customers_wholesale'

Step 9 - Remove the duplicate instances of 'customers_wholesale':

**delete line 100 in admin/customers.php** -     $customers_wholesale = zen_db_prepare_input($_POST['customers_wholesale']);
**delete line 258 in admin/customers.php** -     'customers_wholesale' => $customers_wholesale
**remove duplicate 'c.customers_wholesale' in line 350 of admin.customers.php

**
**These files will be modified: **

includes/functions/functions_prices.php
includes/modules/products_quantity_discounts.php
includes/modules/pages/login/header_php.php
includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_product_info_display.php
admin/customers/php
includes/classes/shopping_cart.php

Step 10 - Add the following code to view Wholesale Price Level in the admin right listBox:

look in file - admin/customers.php for: $contents[] = array('text' => '<br />' . CUSTOMERS_REFERRAL . ' ' . $cInfo->customers_referral);

and add this line below it: $contents[] = array('text' => '<br />' . ENTRY_WHOLESALE_PRICING_LEVEL . ' ' . $cInfo->customers_wholesale);

Step 11 - Correct the variable in admin/customers.php:

search for: '$customers_query_raw'

you will find: 'customers_wholesale' at the end of the statement.

replace it with: 'c.customers_wholesale'

Step 12 - Ensure that you have uploaded all of the files in the package!

Step 13 - Log in to admin, go to customers/customers and notice the column 'Request Wholesale' defaults to 0.

**Step 14 **- Click on your test account name, notice the right listBox reads 'Wholesale pricing level 0'.

Step 15 - Edit your account and change the 'Wholesale pricing level' to 1, click update.

Step 16 - You will return to the admin page and see the value has changed in the 'Request Wholesale' column.

Step 17 - Click on Catalog, Select a Product, Add in a Wholesale Price (right below the 'Products Price (Gross)')

Step 18 - Log into your live ZenCart test account - like a customer would, you will see 'Whole Sale Price:' below the retail price of the product you added a wholesale price to in Step 17.

Step 19 - Thank me.

NOTES: Know that the login page (includes/modules/pages/login/header_php.php) holds the first 'switch' to find the 'customers_wholesale' price level. If the cart timed out or the switch didn't get turned on via the login page, the cart won't see the wholesale pricing level.

I thank you. Twitch.

16 Jan 2011, 1:26 AM
#688
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

rayring:

Hi Everyone,

Just spent 3 hours of browsing through forums for the answer of one simple question:

Is it possible with this dual pricing mod to display the wholesale prices without taxes. While the retail prices are shown with taxes?

This question has been asked several times on different forums but there is no clear answer on this.

Thanks in advance :bigups:

Yes it's possible, it would require some hard coding and a mitt full of time.

16 Jan 2011, 2:42 PM
#689
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: DUAL Pricing v2

when installing the sql patch I got this:

1054 Unknown column 'customers_wholesale' in 'zen_customers'
in:
[ALTER TABLE zen_customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL AFTER customers_wholesale;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

16 Jan 2011, 5:21 PM
#690
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: DUAL Pricing v2

when I went to Admin->customers->customers: I get this page : "Parse error: syntax error, unexpected T_STRING in /home/xxx/xxx/Admin/customers.php on line 91

Line 91 reads: sale = zen_db_prepare_input($_POST['customers_wholesalesale']);

16 Jan 2011, 6:01 PM
#691
green_couch_designs avatar

green_couch_designs

New Zenner

Join Date:
Mar 2010
Location:
Canada
Posts:
46
Plugin Contributions:
0

Re: DUAL Pricing v2

Is it possible to have different shipping rates for wholesale customers with this mod?
Thanks.

16 Jan 2011, 6:22 PM
#692
zl_conquistador avatar

zl_conquistador

New Zenner

Join Date:
Nov 2010
Location:
Ohio
Posts:
31
Plugin Contributions:
0

Re: DUAL Pricing v2

Hollywood691:

when I went to Admin->customers->customers: I get this page : "Parse error: syntax error, unexpected T_STRING in /home/xxx/xxx/Admin/customers.php on line 91

Line 91 reads: sale = zen_db_prepare_input($_POST['customers_wholesalesale']);

wholesalesale?

17 Jan 2011, 1:23 AM
#693
townsend2009 avatar

townsend2009

New Zenner

Join Date:
Nov 2008
Posts:
93
Plugin Contributions:
0

Re: DUAL Pricing v2

I think I may wait for the mod to be updated. LOL I'm a bit confused ;)

17 Jan 2011, 2:19 AM
#694
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: DUAL Pricing v2

ZL Conquistador - I didnt even notice that LOL. I reverted all my files back to the files I downloaded with the Mod. It was working ok for me I guess......I didn't do anything more than log in and look at it with me set as a wholesale customer.

I would like to see products Retail Price AND wholesale price which is what I thought would happen by doing all this with Twitchs update. The sql patch gave errors installing it, along with this one, that ooks like an easy fix for me now that you brought it to my attention.

The only thing I found that I had to do was replace the Attributes_controller_php like recommended cause the one in the Mod package didnt allow me to define my attributes.

I have 1.39h

17 Jan 2011, 8:28 AM
#695
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

Hollywood691:

when installing the sql patch I got this:

1054 Unknown column 'customers_wholesale' in 'zen_customers'
in:
[ALTER TABLE zen_customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL AFTER customers_wholesale;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

apply this SQL patch:

ALTER TABLE customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL;

and let me know if it resolves your issue.
Thanks
Twitch.

17 Jan 2011, 8:44 AM
#696
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

ZL Conquistador:

wholesalesale?

This is a result of using find/replace without reading each line BEFORE replacing the text string.

OR incorrectly following step 7 and 8.

Thanks
Twitch.

18 Jan 2011, 1:59 AM
#698
hollywood691 avatar

hollywood691

New Zenner

Join Date:
Jan 2011
Posts:
58
Plugin Contributions:
0

Re: DUAL Pricing v2

apply this SQL patch:

ALTER TABLE customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL;

and let me know if it resolves your issue.
Thanks
Twitch.

Thanks twitch! Mod works perfect so far as well as I can see.

The problems I had with > when I went to Admin->customers->customers: I get this page : "Parse error: syntax error, unexpected T_STRING in /home/xxx/xxx/Admin/customers.php on line 91

Line 91 reads: sale = zen_db_prepare_input($_POST['customers_wholesalesale']);

was exactly like you said. I did not Read, and just did the find and replace. I see how that happened now.

Thank you very much! :clap:

Hollywood~

21 Jan 2011, 10:28 PM
#699
missmobtown avatar

missmobtown

New Zenner

Join Date:
Oct 2010
Location:
San Francisco
Posts:
6
Plugin Contributions:
0

Re: DUAL Pricing v2

twitchtoo:

Ok, here it is, step by step installation, bug fix and testing!

Install instructions for Dual Pricing - Wholesale Pricing v1.9t

This version works on ZenCart 1.3.9.h as of Jan 15th 2011

...

twitchtoo,

I'm on version 1.3.9h.
I am SO SO close I can taste it, but I can't figure out what this issue is. I followed all your instructions to the letter, but I'm not sure where the last problem is coming from.

I can set up new accounts with no problem, and administer them from Customers/Admin, but I now get this error when I try to log in on the front ened:

1054 Unknown column 'customers_whole' in 'field list'
in:
[SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, customers_authorization, customers_referral, customers_whole FROM customers WHERE customers_email_address = 'missmobtown######################']

I do seem to be able to add wholesale prices to the products in my catalog, so that part is working fine. Hopefully this is a quick fix, any ideas? :blink:

Thanks!
CG

21 Jan 2011, 10:50 PM
#700
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

missmobtown:

twitchtoo,

I'm on version 1.3.9h.
I am SO SO close I can taste it, but I can't figure out what this issue is. I followed all your instructions to the letter, but I'm not sure where the last problem is coming from.

I can set up new accounts with no problem, and administer them from Customers/Admin, but I now get this error when I try to log in on the front ened:

1054 Unknown column 'customers_whole' in 'field list'
in:
[SELECT customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id, customers_authorization, customers_referral, customers_whole FROM customers WHERE customers_email_address = 'missmobtown######################']

> 
> Thanks!
> CG

the error is in your very first line:
**'customers_whole**'.

AFTER this bug is fixed following my instructions you should have ONLY '**customers_wholesale**'.

If you installed the wholesale module **THEN **applied my fix you need to pm me for the reversal instructions. 

I repeat, change all:

- customer_whole
- customer_wholesale and 
- customers_whole 

to only '**customers_wholesale**'.

Please let me know if you encounter any further issues.

Twitch.