Zen Cart Logo

DUAL Pricing v2

Views: 363,359

Results 721 to 740 of 1,504
9 Feb 2011, 2:00 PM
#721
twitchtoo avatar

twitchtoo

Totally Zenned

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

DUAL Pricing v2

Check that this file:
includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

**contains this code:

// base price
//
*********************************************************************
//DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//
********************************************************************
if ($_SESSION['customers_wholesale'] && $_SESSION['customers_wholesale'] != '0' ) {
echo '<span id="retailwhole">' . ' Retail Price: '.$one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == '1') ? TEXT_BASE_PRICE : '') . zen_get_products_display_retail_net_price((int)$_GET['products_id']).'</span><br /> ';
}
//***********************************************************************
//END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//
********************************************************************

if ($show_onetime_charges_description == 'true') {
$one_time = ' <span> Your Price: ' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
} else {
$one_time = '';
}
//*********************************************************************************
//Properly display price labeling when set to Whole sale and when not
//
******************************************************************************
if ($_SESSION['customers_wholesale'] && $_SESSION['customers_wholesale'] != '0' ) {
echo '<span id="whole">Whole Sale Price: ';
} else {
echo '<span id="retail">Retail Price: ';
}
echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
echo '</span>';
//*********************************************************************************
//END Properly display price labeling when set to Whole sale and when not
//
******************************************************************************

Those echo lines actually print the code on the screen in the cart. Meaning two things, if they don't exist there will be nothing to print and, if they do exist, there is a break somewhere in the equation that is passing the information to them to print.

Just to check, you have added this SQL patch from post #695:
ALTER TABLE customers ADD customers_wholesale VARCHAR( 4 ) DEFAULT '0' NOT NULL;

Twitch.

9 Feb 2011, 6:26 PM
#722
chopshop avatar

chopshop

New Zenner

Join Date:
Feb 2011
Posts:
4
Plugin Contributions:
0

Re: DUAL Pricing v2

I've been following along and I'm just not getting something...
I finally got the '1054 Unknown column... already exists' errors to stop when i'm logging under my custormer account.

I'm not seeing the wholesale price option when I edit the product.
I've double checked everything with 'customers_wholesale' and re-uploaded everything to my 'zc_admin' and 'includes' folders.
What am I missing?

In the admin / customers I can see 'Request Wholesale'...
I've changed my account to 1 (wholesale) and I can't change it back to 0. Is this supposed to happen?

PLEASE Help! I've almost got it.

9 Feb 2011, 6:31 PM
#723
chopshop avatar

chopshop

New Zenner

Join Date:
Feb 2011
Posts:
4
Plugin Contributions:
0

Re: DUAL Pricing v2

ChopShop:

I'm not seeing the wholesale price option when I edit the product.
I've double checked everything with 'customers_wholesale' and re-uploaded everything to my 'zc_admin' and 'includes' folders.
What am I missing?

In the admin / customers I can see 'Request Wholesale'...
I've changed my account to 1 (wholesale) and I can't change it back to 0. Is this supposed to happen?
.

Okay... I see the wholesale option when I click new product 'General' but not when I use the FREE Shipping module.

Do I have to input all my products again as a new products? I can't edit and add a wholesale price?

9 Feb 2011, 7:03 PM
#724
chopshop avatar

chopshop

New Zenner

Join Date:
Feb 2011
Posts:
4
Plugin Contributions:
0

Re: DUAL Pricing v2

After I change wholesale pricing level in customer options nothing shows up... no 1 or 2 or 0. and I can't change it back to 0. I have to delete the account and re-register a new account to get it back to a 0.
after i change it the account to 1 (and nothing shows up in the request wholesale column) I still can't see wholesale pricing.

Sorry for so many post this thing is driving me Crazy!

9 Feb 2011, 9:32 PM
#725
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

ChopShop:

I've been following along and I'm just not getting something...
I finally got the '1054 Unknown column... already exists' errors to stop when i'm logging under my custormer account.

I'm not seeing the wholesale price option when I edit the product.
I've double checked everything with 'customers_wholesale' and re-uploaded everything to my 'zc_admin' and 'includes' folders.
What am I missing?

In the admin / customers I can see 'Request Wholesale'...
I've changed my account to 1 (wholesale) and I can't change it back to 0. Is this supposed to happen?

PLEASE Help! I've almost got it.

I'll try to explain one problem at a time, run this SQL patch to fix the column error in your database only if you have already installed the SQL that came with the dual pricing module:

ALTER TABLE customers DROP customers_whole ;

This will remove the extra column and ensure no code can find the column with or without data.

Backup your database first and test the backup to ensure nothing goes wrong.

Twitch.

9 Feb 2011, 9:40 PM
#726
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

ChopShop:

Okay... I see the wholesale option when I click new product 'General' but not when I use the FREE Shipping module.

Do I have to input all my products again as a new products? I can't edit and add a wholesale price?

The free shipping module runs off a different .php file than the general products file.

To remedy this you would have to add in all of the wholesale code from the general products file into the correct places of the free shipping file, and any other supporting files for the **free shipping module.

Twitch.
**

9 Feb 2011, 9:52 PM
#727
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

ChopShop:

After I change wholesale pricing level in customer options nothing shows up... no 1 or 2 or 0. and I can't change it back to 0. I have to delete the account and re-register a new account to get it back to a 0.
after i change it the account to 1 (and nothing shows up in the request wholesale column) I still can't see wholesale pricing.

Sorry for so many post this thing is driving me Crazy!

This is a result of the patch that I created #687 and SQL update #695 not being installed correctly.

**Or, **

The files were not published to your live site.

How do I know?
The switches are controlled by the variables that are corrected in the bug fix, the columns in the database simply turn on or off. If your admin turns the switch **on **but not **off **it means the code that turns the switch **off **is incorrect.

I spent countless hours tracing each one, the patch works, implementing it step by step also works, uploading it can be a crap shoot at times. But remember if you have other modules installed, or perhaps someone overwrote the default template files, finding the problems will take much more time.

Keep me posted, I can help.

Twitch.

10 Feb 2011, 3:53 AM
#728
chopshop avatar

chopshop

New Zenner

Join Date:
Feb 2011
Posts:
4
Plugin Contributions:
0

Re: DUAL Pricing v2

missta:

Twitch...
But when I sign in as a customer-with level one: I only see 1 price.
I cleared & closed the browser, cleared all browsing history from last day. Tried with internet explorer too. and this is what i see. :wacko:
(((IMAGE)))

I've got it working. Well I think i got it. I have to rethink my Free shipping approach but thats no problem... I'll deal with it by setting up the free shipping option over a certain $ amount.
Now the only problem I'm is that I see the retail on the product page. No wholesale. I can only see the wholesale price in the cart.

Thanks Twitch!

10 Feb 2011, 4:49 AM
#729
missta avatar

missta

New Zenner

Join Date:
Jan 2011
Location:
Colorado
Posts:
15
Plugin Contributions:
0

Re: DUAL Pricing v2

Hey Twitch, I got it to work. Thanks so much.
Here was the problem: I put the tpl_product_info_display.php file into the wrong folder.

I put it in the /includes/templates/template_default/templates (following the same paths as the mod.zip file did) instead of **includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php **

It works great now. Thanks so so so much! You're the best. :clap:

Also, thank you for being so patient with me. :hug:

This is what i see now. :laugh:

Let me know what i can do to repay your generosity. One thing i won't be able to help you is coding! My major is Fashion Designs & Arts anything along those lines i can help. :P

Thanks agian.

10 Feb 2011, 5:08 AM
#730
missta avatar

missta

New Zenner

Join Date:
Jan 2011
Location:
Colorado
Posts:
15
Plugin Contributions:
0

Re: DUAL Pricing v2

ChopShop:

I've got it working. Well I think i got it. I have to rethink my Free shipping approach but thats no problem... I'll deal with it by setting up the free shipping option over a certain $ amount.
Now the only problem I'm is that I see the retail on the product page. No wholesale. I can only see the wholesale price in the cart.

Thanks Twitch!


*Did you follow these instructions by Twitchtoo on this post page #69? Here are the instructions:
Note: I had the same problem as you.

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?ma...roducts_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/showpo...&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 This is an important locations. You won't be able to see the retail&wholesale price if you put it in /includes/templates/template_default/templates (as the mod.zip file instructs you to do)
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 TwitchToo

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.

Goodluck!

10 Feb 2011, 6:54 AM
#731
thomaswhiteeagle avatar

thomaswhiteeagle

New Zenner

Join Date:
May 2007
Posts:
93
Plugin Contributions:
0

Re: DUAL Pricing v2

I've read every single post in this forum and a still frustrated. I tried following through the "fix" provided on page 68 I think it was but had nothing but issues. So I have reverted back to the original install of this mod which works perfectly fine for me except one, well two things which I'd like to know how to fix.

One is, a wholesale account sees their pricing fine until they order, once in the cart it reverts to retail. How do I fix that?

Two, how can I remove taxes from wholesale?

Or maybe three. is there a better module for wholesale versus retail pricing that works and is maybe a little easier to implement.

10 Feb 2011, 7:49 AM
#732
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

ChopShop:

I've got it working. Well I think i got it. I have to rethink my Free shipping approach but thats no problem... I'll deal with it by setting up the free shipping option over a certain $ amount.
Now the only problem I'm is that I see the retail on the product page. No wholesale. I can only see the wholesale price in the cart.

Thanks Twitch!

I use the free shipping module with the site I'm working on, however all of the products use the product type 'general'.

It also uses 6 cloned flat rate modules, free shipping options and two cloned flat rate zones. I found that these can conflict with each other... and with the stock free shipping module.

This may not be related to the Dual Pricing v2 module or appropriate to talk about in this support thread, but now you know it's possible and it can work with minimal changes :).

Twitch.

10 Feb 2011, 8:11 AM
#733
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

thomaswhiteeagle:

I've read every single post in this forum and a still frustrated. I tried following through the "fix" provided on page 68 I think it was but had nothing but issues. So I have reverted back to the original install of this mod which works perfectly fine for me except one, well two things which I'd like to know how to fix.

One is, a wholesale account sees their pricing fine until they order, once in the cart it reverts to retail. How do I fix that?

Two, how can I remove taxes from wholesale?

Or maybe three. is there a better module for wholesale versus retail pricing that works and is maybe a little easier to implement.

One - I'm not sure what version of ZenCart you are using, however the current Dual Pricing Module does NOT work with version 1.3.9h.

Two - I have not developed a 'Wholesale Tax' module for products and shipping just yet. If I do I'll be sure to share with the group.

Twitch.

10 Feb 2011, 8:21 AM
#734
twitchtoo avatar

twitchtoo

Totally Zenned

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

Re: DUAL Pricing v2

missta:

Hey Twitch, I got it to work. Thanks so much.
Here was the problem: I put the tpl_product_info_display.php file into the wrong folder.

I put it in the /includes/templates/template_default/templates (following the same paths as the mod.zip file did) instead of **includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php **

It works great now. Thanks so so so much! You're the best. :clap:

Also, thank you for being so patient with me. :hug:

This is what i see now. :laugh:

Let me know what i can do to repay your generosity. One thing i won't be able to help you is coding! My major is Fashion Designs & Arts anything along those lines i can help. :P

Thanks agian.

"Step 19 - Thank Me" I believe you've done that :)

Twitch.

11 Feb 2011, 1:10 AM
#735
thomaswhiteeagle avatar

thomaswhiteeagle

New Zenner

Join Date:
May 2007
Posts:
93
Plugin Contributions:
0

Re: DUAL Pricing v2

twitchtoo:

One - I'm not sure what version of ZenCart you are using, however the current Dual Pricing Module does NOT work with version 1.3.9h.

Two - I have not developed a 'Wholesale Tax' module for products and shipping just yet. If I do I'll be sure to share with the group.

Twitch.

I am using version 1.3.9f. So it is useless then unless you are using an older and less secure version of zencart you are saying? What will it take to have someone with coding expertise that is familiar with this module to update it so it works with latest version of zen?

15 Feb 2011, 9:25 PM
#736
someitguy79 avatar

someitguy79

New Zenner

Join Date:
Feb 2011
Posts:
3
Plugin Contributions:
0

Re: DUAL Pricing v2

Any thoughts on the 1.3.9h issue? I am looking at downgrading to 1.3.9g. Its nuts that a patch at the letter level would cause this sort of breakage.

This works great on h till you hit the shopping cart.

15 Feb 2011, 11:16 PM
#737
stevefriedman71 avatar

stevefriedman71

Zen Follower

Join Date:
Sep 2006
Posts:
269
Plugin Contributions:
0

Re: DUAL Pricing v2

i have H too and it seems to work

15 Feb 2011, 11:21 PM
#738
someitguy79 avatar

someitguy79

New Zenner

Join Date:
Feb 2011
Posts:
3
Plugin Contributions:
0

Re: DUAL Pricing v2

stevefriedman71:

i have H too and it seems to work

Everything works. However, at check out the cart shows retail pricing and not wholesaling. Unless I am missing something h seems to not work correctly on the cart.

15 Feb 2011, 11:27 PM
#739
stevefriedman71 avatar

stevefriedman71

Zen Follower

Join Date:
Sep 2006
Posts:
269
Plugin Contributions:
0

Re: DUAL Pricing v2

someitguy79:

Everything works. However, at check out the cart shows retail pricing and not wholesaling. Unless I am missing something h seems to not work correctly on the cart.
to me, it shows the price your pay, according to your price band number in the cart as well. might be a code issue. or - even worse - a cache issue if the error is just on your home pc and you test it right after in the same browser. contact me via pm and i can try to see whats going on.

15 Feb 2011, 11:40 PM
#740
someitguy79 avatar

someitguy79

New Zenner

Join Date:
Feb 2011
Posts:
3
Plugin Contributions:
0

Re: DUAL Pricing v2

stevefriedman71:

to me, it shows the price your pay, according to your price band number in the cart as well. might be a code issue. or - even worse - a cache issue if the error is just on your home pc and you test it right after in the same browser. contact me via pm and i can try to see whats going on.

I did send you a PM. Others above are having issues with 1.3.9h too when the item is placed into the cart. I have tried a mac and a PC both same result.