Zen Cart Logo

DUAL Pricing v2

Views: 363,316

Results 321 to 340 of 1,504
2 Oct 2008, 10:13 PM
#321
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

DUAL Pricing v2

yes, this would be the way, either make all customers wholesale with a sql script , and then make all new ones default wholesale too, or overide the checks, then ull always get both, and if u install my mod too, u can get specials as well.

5 Oct 2008, 4:21 PM
#322
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Hello All,

Can someone please help me fix a goof? I installed the Dual Pricing add on but dummy me uploaded the files first before installing the SQL patches and now when I try to install an SQL patch it gives me a 403 Forbidden error...

Any ideas?

Thanks in advance!

Gary777

5 Oct 2008, 5:03 PM
#323
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Hello Again,

I went into my SQL admin area on my server and uploaded the patches by hand, things seem to be working great, I like the concept of this mod... I have no clue if the "Install SQL Patches" works now, is there a bit of innocuous sql I can patch in to test it?

Also, is there a possibility of making the whole sale levels discount based? I.E.

level 1 - 5%
level 2 - 10%
level 3 - 15%
level 4 - 20%

Thanks again for a great mod!

Gary777

5 Oct 2008, 9:04 PM
#324
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: DUAL Pricing v2

Gary777:

Hello All,

Can someone please help me fix a goof? I installed the Dual Pricing add on but dummy me uploaded the files first before installing the SQL patches and now when I try to install an SQL patch it gives me a 403 Forbidden error...

Any ideas?

Thanks in advance!

Gary777

good to hear it worked, ive had a similiar thing happen to me b4 with austpost mod.

levels could be coded, not that id be doing that

5 Oct 2008, 9:41 PM
#325
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: DUAL Pricing v2

Just downloaded this mod, do i need the file "includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php" if i dont upload it will it cause errors? I ask of this because it messes up my add to cart box that i have customized.
Another few questions i have that I would like to see if possible?

1- Charge a wholesaler $2.00 fee on every order?
2-Charge a wholesaler $2.50 fee on every order under 10lbs
3- I offer free shipping on order over $50 but under $15.00 can i disable this for a wholesaler?
-OR-
Would it be easier just to be able to set a certain amount or certain weight that if they do not reach that they cannot checkout?...
FOR EXAMPLE:
They have an order of 15.99 and for wholesalers I have a minimum order of $20.00, and have the cart tell them they cannot checkout or just not allow them two? thanks!
**great mod!

6 Oct 2008, 6:12 AM
#326
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Hi Again folks,

Well my database problems are much worse than I originally imagined... When I made the good I refer to above it apparently jacked something up because now I can't log into other PHP applications and my databases are NOT allowing writes from any of my apps except Zen Cart (this is very bad!)

When I try to log into the administrative areas of two PHP apps this is the error I get...

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I have checked the .htaccess files that I think could have been the culprit with no luck... Any ideas???

Help would be greatly appreciated!

Gary777

6 Oct 2008, 7:39 PM
#327
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

Gary777:

Also, is there a possibility of making the whole sale levels discount based? I.E.

level 1 - 5%
level 2 - 10%
level 3 - 15%
level 4 - 20%

Gary currently there is not a way to do this. But there could be an easy work in the admin section to get this to work. Either automatically using pre-defined percentages or using percentages you enter in. Also there would be an easy SQL patch you could run to define this. The problem there is you'd have to run the patch every time you added a new item.

The percents might be a good thing to do for a next release. I'm working on one but it's back burner for now because I have way to much other work.

6 Oct 2008, 7:51 PM
#328
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

Gary777:

Hi Again folks,

Well my database problems are much worse than I originally imagined... When I made the good I refer to above it apparently jacked something up because now I can't log into other PHP applications and my databases are NOT allowing writes from any of my apps except Zen Cart (this is very bad!)

When I try to log into the administrative areas of two PHP apps this is the error I get...

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

I have checked the .htaccess files that I think could have been the culprit with no luck... Any ideas???

Help would be greatly appreciated!

Gary, the only thing I could think of is checking and double checking your user rights for MySQL. Maybe creating new ones and swapping the programs over and seeing if that cleans things up. If not the fastest and most reliable way to get this done will be through your server admin. give them a call and see. this problem is outside of the scope of Dual Pricing and Zen-cart for that matter. Although if you search some of the other forums you might get an idea.

6 Oct 2008, 7:58 PM
#329
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

ryanb4614:

Just downloaded this mod, do i need the file "includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php" if i dont upload it will it cause errors? I ask of this because it messes up my add to cart box that i have customized.

Ryan, The template needs to be installed in order to show the prices. But you are combining two custom files. Use something like WinMerge to get this done. Also you can look at the Dual Pricing file and see that it's clearly noted where the file is modified and what needs to carry over to your site.

ryanb4614:

Another few questions i have that I would like to see if possible?

1- Charge a wholesaler $2.00 fee on every order?
2-Charge a wholesaler $2.50 fee on every order under 10lbs
3- I offer free shipping on order over $50 but under $15.00 can i disable this for a wholesaler?
-OR-
Would it be easier just to be able to set a certain amount or certain weight that if they do not reach that they cannot checkout?...
FOR EXAMPLE:
They have an order of 15.99 and for wholesalers I have a minimum order of $20.00, and have the cart tell them they cannot checkout or just not allow them two? thanks!
**great mod!
all this is possible, you or somebody familiar with Zen-Cart code will need to add some checks and custom applications of dual pricing to your site. Disabling free shipping is probably the easiest.

6 Oct 2008, 8:17 PM
#330
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Thanks madfastride!

I was able to get most of my issues sorted out and 1 of the issues was unrelated (an odd consequence.) Things are back to normal for the most part...

The problem seems to have stemmed from my calling the script before I had uploaded the SQL patches (still not sure if that function in Zen Cart is working as I haven't tried to apply a patch since.) For whatever reason it put a temporary whammy on my MYSQL database/s (must have been some kind of recursive issue that finally timed out, I suspect sessions may have had something to do with it as well.)

Thanks again for your help,

Gary777

6 Oct 2008, 9:41 PM
#331
weezee avatar

weezee

Zen Follower

Join Date:
May 2006
Location:
Louisiana
Posts:
259
Plugin Contributions:
0

Re: DUAL Pricing v2

I changed display:

//***********************************************************************
//DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//
********************************************************************

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 /> ';

//********************************************************************

It someone go to my site and don't sign in the retail price shows twices on the product page.
What I need to do to have display retail for non customer who visit my site and just browse.
currysgiftshop.com

6 Oct 2008, 11:26 PM
#332
weezee avatar

weezee

Zen Follower

Join Date:
May 2006
Location:
Louisiana
Posts:
259
Plugin Contributions:
0

Re: DUAL Pricing v2

Also retail customer see two retail prices displayed when they are signed in.

I would like for the retail customer to only see the retail price displayed, and any one just visiting my site to see the retail price. The wholesale customer sees the wholesale and retail price I don't want to change that.

7 Oct 2008, 5:00 PM
#333
weezee avatar

weezee

Zen Follower

Join Date:
May 2006
Location:
Louisiana
Posts:
259
Plugin Contributions:
0

Re: DUAL Pricing v2

Can anyone tell me if there's a way to just display one retail price to retail customers and website vistors.

7 Oct 2008, 5:53 PM
#334
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Hi Weezee,

I am new to Zen Cart and not an expert but I checked your code and wherever you are calling the code to show pricing you need an if statement to determine if a wholesale customer is logged in.

Sorry I can't tell you where that is off the top of my head, but the resultant code looks like this in HTML:

<h2 id="productPrices" class="productGeneral">
<span id="retailwhole"> Retail Price: $49.95</span>
<br/>
<span id="retail">Retail Price: $49.95</span>
</h2>

As you can see it is showing the price twice, From your previous posts it looks like this file may be your key, and it looks like the IF statement already exists, did you modify the logic some how? The IF statement seems to be missing:

//***********************************************************************
//***DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************

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 /> ';

//********************************************************************

What did you change in this file?

Gary777

7 Oct 2008, 9:41 PM
#335
weezee avatar

weezee

Zen Follower

Join Date:
May 2006
Location:
Louisiana
Posts:
259
Plugin Contributions:
0

Re: DUAL Pricing v2

This is the part I changed. (taken from tpl_product_info_display.php, line 67-75) The post is located here:

http://www.zen-cart.com/forum/showthread.php?p=574582&highlight=DISPLAY+NET+RETAIL+PRICE#post574582

//***********************************************************************
//DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//
********************************************************************
if ($_SESSION['customer_id']) {
$customers_id = $_SESSION['customer_id'];
$customer_check = $db->Execute("select * from " . TABLE_CUSTOMERS . " where customers_id = '$customers_id'");
if ($customer_check->fields['customers_whole'] != "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
//
********************************************************************

8 Oct 2008, 4:10 AM
#336
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

weezee:

Can anyone tell me if there's a way to just display one retail price to retail customers and website vistors.

This is the way the module works. You shouldn't need to change anything. The post you linked to was for somebody who wanted to show both prices to all visitors regardless of their status. The module without modifications will show:

(Retail and non logged in) will view:

Retail: XXX

(Logged in WS customers) will view:

Retail XXX
Whole Sale: YYY

I'm sorry if I don't understand the question properly and failed to explain what you were asking. Please just ask again if this is the case

8 Oct 2008, 5:15 AM
#337
gary777 avatar

gary777

New Zenner

Join Date:
Oct 2008
Location:
Midwest USA
Posts:
71
Plugin Contributions:
0

Re: DUAL Pricing v2

Hi Madfastride and weezee,

This explains what weezee did, he/she changed the actual text of the line to read "Retail" where it should have read "Whole Sale:"

echo '<span id="retailwhole">' . ' Retail Price: 

This is part of what confused me too... The module should have worked as is...

Nice module by the way!

Gary777

8 Oct 2008, 5:34 AM
#338
weezee avatar

weezee

Zen Follower

Join Date:
May 2006
Location:
Louisiana
Posts:
259
Plugin Contributions:
0

Re: DUAL Pricing v2

Thanks,

The post for someone else. I had a misunderstanding of the post, I thought it was to display both wholesale and retail for the wholesale user, but when I changed the file I had two retail prices displaying, but the wholesale was ok, it was displaying the retail and wholesale price when the user was login.

8 Oct 2008, 12:22 PM
#339
ryanb4614 avatar

ryanb4614

Totally Zenned

Join Date:
Feb 2008
Posts:
556
Plugin Contributions:
0

Re: DUAL Pricing v2

[QUOTE=madfastride;622382]Ryan, The template needs to be installed in order to show the prices. But you are combining two custom files. Use something like WinMerge to get this done. Also you can look at the Dual Pricing file and see that it's clearly noted where the file is modified and what needs to carry over to your site.

Well I haven't added that file, and what happens is.... the price will change but it just won't say retail and whole sale. the price just shows at the wholesale price.... checkout and everything works so i assume it is safe to leave it at that.

9 Oct 2008, 4:28 AM
#340
madfastride avatar

madfastride

Zen Follower

Join Date:
Feb 2007
Location:
Earth
Posts:
115
Plugin Contributions:
0

Re: DUAL Pricing v2

Gary777:

Hi Madfastride and weezee,

echo '<span id="retailwhole">' . ' Retail Price:


Okay I understand that... What I was trying to get across with the naming of the id was that it was going to be the Retail price displayed to a whole sale customer... I tried to keep it separate in case one wants to display and style the retail price for retail customer different that retail price for whole sale customer. Say...

(Retail customer)
Your Price: XXXX (id="retail")

(Whole Sale customer)

MSRP: XXX (id="retailwhole")
Whole Sale Price: YYY (id="whole")

Sorry for any confusion. I tried to explain it in the read me.

> **Gary777:**
>
> Nice module by the way!

I just picked up on this where some others who had done some hard work left off.  But thanks for the little bit I did.