-
Re: DUAL Pricing - specials addon
http://hthring.com/downloads/dual_pricing-specials.zip
now you can have a seperate special rate for each products price braket
changes allow for seperate special for wholesale and retail prices ala dual pricing mod.
firstly, not all files may be here ... let me know if it doesnt work for u...
this will probably not work if you are using attribute pricing or sales pricing (the wholesale specials that is), and also probably doesnt work with multi wholesale pricing bracxets
secondly you need to jump into phpmyadmin and add a new field to the specials table called;
*********
wholesale_special_products_price
with type decimal(15,4)
*********
disclaimer: dont do this on your good cart, create backups of the files or use a test installation
this is work in progress, "testing"
once youve migrated my changes by comparing with diff, or using ftp it should be happening.
make a special the same as its corresponding standard price and it hides it for that pricing group.
www.hthring.com :smile:
http://hthring.com/downloads/screener.jpg
http://hthring.com/downloads/screener2.jpg
http://hthring.com/downloads/dbase3.jpg
-
Re: DUAL Pricing - specials addon
** #02 Update, thanks to E.F. on the boards for trying this out and getting back to me... there was a missing file.
also use this sql patch/code instead of phpmyadmin if you prefer:
*********
ALTER TABLE `specials` ADD `wholesale_special_products_price` DECIMAL( 15, 4 ) DEFAULT '0' NOT NULL;
*********
ive tested it on a fresh ZC install, so you should have better luck this time ,sorry:
http://www.hthring.com/downloads/dua...als_mod-02.zip
-
Re: DUAL Pricing - specials addon
Quote:
Originally Posted by
hayden
** #02 Update, thanks to E.F. on the boards for trying this out and getting back to me... there was a missing file.
also use this sql patch/code instead of phpmyadmin if you prefer:
*********
ALTER TABLE `specials` ADD `wholesale_special_products_price` DECIMAL( 15, 4 ) DEFAULT '0' NOT NULL;
*********
ive tested it on a fresh ZC install, so you should have better luck this time ,sorry:
http://www.hthring.com/downloads/dua...als_mod-02.zip
Thanks for the cudo's ... it is good as it stands .. however there needs to be a connect from the category/products page in admin to it as well, for those that wish to do the special pricing right after adding the product by using the green $ on the product listing. As it stands at the moment you get the original ... install button or edit button, but when you bring up the information there you can not edit wholesale special pricing. I am a great tester, and implementer, a lousey programer, so I couldn't even start to figure out what files need to be altered.
One word of warning!!! Do this only on a fresh install, because otherwise you will have to go fix all your wholesale pricing, because it sets everything to $0.00 and therefore everything becomes free. I learned that the hard way with over 1500 products already loaded.
-
Re: DUAL Pricing - specials addon
Quote:
Originally Posted by
Elle Fresco
Thanks for the cudo's ... it is good as it stands .. however there needs to be a connect from the category/products page in admin to it as well, for those that wish to do the special pricing right after adding the product by using the green $ on the product listing. As it stands at the moment you get the original ... install button or edit button, but when you bring up the information there you can not edit wholesale special pricing. I am a great tester, and implementer, a lousey programer, so I couldn't even start to figure out what files need to be altered.
One word of warning!!! Do this only on a fresh install, because otherwise you will have to go fix all your wholesale pricing, because it sets everything to $0.00 and therefore everything becomes free. I learned that the hard way with over 1500 products already loaded.
i will look into that connect this afternoon, did you have that wholesale info backed up ?? i cant understand how it set everything to free, my code shouldn't touch the wholesale price itself...
-
Re: DUAL Pricing - specials addon
Quote:
Originally Posted by
hayden
i will look into that connect this afternoon, did you have that wholesale info backed up ?? i cant understand how it set everything to free, my code shouldn't touch the wholesale price itself...
Oops ... spoke too soon it is not calculating right at all ... not sure where it's messing up as it makes no sense.
Just the dual pricing reads right the retail is right and the wholesale is calculating right if there is no discount on the wholesale price. However if you discount the wholesale as I did .. because one of my suppliers bumped me to the highest wholesale level, after 1000's in sales. So instead of changing all the pricing I just did an overall 7% discount. Now I have a messed up retail amount that shoud be 60% ... now showing 77% and a wholesale discount of 7 %. What it did was bring the retail down to the wholesale starting price.
Also there is a problem with the dual pricing mod itself as it will only display the retail size increase, and not the wholesale .. but in the shopping cart it added $5.00 ( the right amount) and not the $7.50 that it showed on the selection screen.
So there is a problem with both the specials add on as well as the Dual pricing mod itself. Here are some screen shots so you can see what I mean:
Retail: http://absolute-wholesale.com/screen...eenShot001.jpg
Then Wholesale with the retail price messed up: http://absolute-wholesale.com/screen...eenShot002.jpg
Then the selection menu that should be $5.00 not $7.50 for wholesale: http://absolute-wholesale.com/screen...eenShot003.jpg
Then the shopping cart with the right amount in it: http://absolute-wholesale.com/screen...eenShot004.jpg
Can anyone figure out what happened and where?
-
Re: DUAL Pricing - specials addon
Quote:
Originally Posted by
hayden
i will look into that connect this afternoon, did you have that wholesale info backed up ?? i cant understand how it set everything to free, my code shouldn't touch the wholesale price itself...
On the product being sold as free ... what happened was for products that were already in the database it added a special price of 0.00 and that looked ok until I logged in as wholesale and realized that all the products were showing a cost of $0.00 I tried to change it to 0% and that did noting so I had to go into specials and actually add the actual wholesale price in for each product.
-
Re: DUAL Pricing version 2
Ok after messing around some more ... I realized that you can not do a copy attributes from categories nor attributes controller. Well you can but it only takes the retail and not the wholesale mark attributes.
Anyone else have this problem?
-
Re: DUAL Pricing version 2
im sorry you missed it but the specials mod is not compatible with sale maker, (store wide discounts/specials) nor pricing by attribute
-
Re: DUAL Pricing version 2
it would require further work to support this
-
Re: DUAL Pricing - specials addon
i guess i could code it in easy enough to make it no special if the special is $0.00, let me know if it make difference and ill have a look
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
hayden
im sorry you missed it but the specials mod is not compatible with sale maker, (store wide discounts/specials) nor pricing by attribute
I knew that salemaker would not work for me because it did not discriminate between retail and wholesale and it discounted my wholesale by 60% also ... which would have had me bankrupt in a day ...lol
But the only specials I had running was through the specials add-on.
The attribute problem is with dual pricing itself, that I know for sure.
I had 60% on the retail side .. and a 7% on the wholesale side, on one main category .. my other main categories were not involved. I have one category per supplier and then sub categories .. so I only needed to special that one category.
I removed the specials add on files ... and now the only issue I am having is the attribute issue, which like I said is Dual pricing's issue. I am sure that's probably a simple fix .. it must have something to do with the attribute copy function. I will allow me to put wholesale imput and keep it on a per item basis .. it just will not allow me to copy them when I copy or duplicate a product.
for instance as you seen I have a sizing increase according to size ... and on a per product basis it works perfectly fine other than displaying the retail in the wholesale area of the catalog. It does calculate properly even though it was based on retail it actually charged the lower wholesale price when on the wholesale side.
So I guess there are actually 2 issues with Dual Pricing .. and that is the copy sttribute function and the display wholesale attribute, when in wholesale area of the catalog.
-
Re: DUAL Pricing version 2
firstly, are you having any problems with my mod ?
i can look at the rest later...
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
hayden
firstly, are you having any problems with my mod ?
i can look at the rest later...
I actually removed your mod .. because it could not resolve the issue that it also deducted more fom the retail price on the wholesale side ... it should have only ever showed 60% off retail and a wholesale price of $XXX reduced by 7 percent. For some reason by using a special on the wholesale side it increased the 60% to 77% off retail displaying on the wholesale side of the catalog.
After reasoning it out ... I think I know how the program came up with that figure ... but not the why as it makes it look like retail and wholesale are the same price. I think what it did was calculate the actual wholesale new price ... showing that the new wholesale price was equaling to 77% off the retail price. That can get confusing though for the customer ... why should the customer buy from my wholesale side if they could get the same discount on the public retail side?
See what I am saying .. look at the second screen shot .. where the retail is now not 60% but 77% and the wholesale is 7% .. but they both have the same buy it price. That is where the confusion comes in from a customer stand point.
-
Re: DUAL Pricing version 2
if you can get that retail displying the wrong amount issue fixed then I would love to add it back in .. it definately had a good functionality to it and it would make things easier.
-
Re: DUAL Pricing version 2
thanks for clarifying that , it is an easy fix i hope, so am looking at it now... perhaps there will be more develpment down the track...
-
Re: DUAL Pricing version 2
it is fixed ,here you go
http://www.hthring.com/downloads/dua...als_mod-03.zip
** #03 Update, corrected retail display special price while logged in wholesale, and corrected admin special row style
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
hayden
Retail on the wholesale side now displays correctly in the catalog. The link to specials.php inside of specials now works correctly.
Issues:
1) Green $ link from within categories/products still not displaying a wholesale edit box. (for those that work on a per item basis)
2) Installing on a store with products still defaults all products to 100% off and makes all pre-loaded products free. My concern here is you can not load the specials add on if you have any product in the store already or it leaves you editing each product one at a time to correct the 0.00 default with the add on.
Getting there!!! :)
-
Re: DUAL Pricing version 2
I'd like my site to have a "list price" and "our price" on every product, and then sale prices on some products like on this site: http://www.diaperbags.com/designer-brands/5354+6776.cfm
Will this add on do this?
Thanks!
-
Re: DUAL Pricing version 2
You'd have to modify the code a bit if you didn't want to go and manually change all your customers over to a whole sale customer. But it would be fairly easy to do. You'd just have to take out some of the checks for WS customers and leave it turned on all the time. Look back at some of my previous comments and I described how to add checks for added functionality. That's the same bit of code you are going to be removing.
This could be the easiest way to go on this one.
Cheers,
-
Re: DUAL Pricing version 2
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.
-
Re: DUAL Pricing version 2
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
-
Re: DUAL Pricing version 2
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
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
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
-
Re: DUAL Pricing version 2
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!
-
Re: DUAL Pricing version 2
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
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
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.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
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.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
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.
Quote:
Originally Posted by
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.
-
Re: DUAL Pricing version 2
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
-
Re: DUAL Pricing version 2
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
-
Re: DUAL Pricing version 2
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.
-
Re: DUAL Pricing version 2
Can anyone tell me if there's a way to just display one retail price to retail customers and website vistors.
-
Re: DUAL Pricing version 2
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:
Code:
<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:
Code:
//***********************************************************************
//***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
-
Re: DUAL Pricing version 2
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/showth...ICE#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
//***********************************************************************
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
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
-
Re: DUAL Pricing version 2
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:"
Code:
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
-
Re: DUAL Pricing version 2
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.
-
Re: DUAL Pricing version 2
[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.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Gary777
Hi Madfastride and weezee,
Code:
echo '<span id="retailwhole">' . ' Retail Price:
This is part of what confused me too... The module should have worked as is...
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.
Quote:
Originally Posted by
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.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
ryanb4614
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.
True Ryan, sorry I should have been more specific. The tpl_product_display.php file will not change any functionality in the Dual Pricing module. It will not display the way it was intended without the change. The module is supposed to display a retail price to retail customers and a retail and whole sale price to whole sale customers. But if you are happy with the functionality by all means keep the module as it is. Cheers,
-
Re: DUAL Pricing version 2
Hi Madfastride,
I must not have been very clear in my post, I understood exactly why you did what you did, it was weezee's post and the double "retail price" listing in her code that threw me off, it should have worked.
I hadn't taken a good look at the code at that point (as I mentioned) but was working on a similar task (that's how I found weezee's post) and saw that she hadn't received a response so tried to help as best I could. Your reply cleared everything up for me and hopefully weezee too.
Thanks again,
Gary777
-
Re: DUAL Pricing version 2
Hi Everyone,
This mod is just what we're looking for and is working like a dream.
Could anyone tell me or help point me in the right direction so it will show the percentage diffrence in the two displayed prices?
So it would display like:
Retail Price: £xx.xx
Wholesale Price: £xx.xx
You Save: xx%
Many many thanks in advance.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
setter
Retail Price: £xx.xx
Wholesale Price: £xx.xx
You Save: xx%
Setter,
I'm glad you like the module. I'd like to add this to a release I'm working on. Along with a few other features, and customizations. But it keeps getting pushed back. You could rename a few variables and do the calculations in the tpl_display_product.php file. If you don't want to mess with it or nobody else has the code <wink>a little donation is going a long way with progressing this release and getting an early copy of the feature you donated for. </wink> PM me if you'd like.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Gary777
Hi Madfastride,
I must not have been very clear in my post, I understood exactly why you did what you did, it was weezee's post and the double "retail price" listing in her code that threw me off, it should have worked.
Gary,
Thanks for pointing me in the right direction there, I did not see it right away and might never have. I understood that you had found the answer and were just helping me out. The second post was just trying to clarify, and over explain for anyone else finding the same problem as I'm a firm believer in that for every person who asks a question here there are five more (well four now that you revealed yourself) with the same problem. It will probably also cause me to change the read me file a bit.
-
Re: DUAL Pricing version 2
Mad,
How would I write the if statement to add $5.00 to my shipping cost??
My retail site has a flat rate of $5.00, but I charge my wholesale customers $10.00 for shipping!!!
Thanks in advance... :)
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
haredo
Mad,
How would I write the if statement to add $5.00 to my shipping cost??
My retail site has a flat rate of $5.00, but I charge my wholesale customers $10.00 for shipping!!!
I don't really know the inner workings of the shipping cost calculations off the top of my head. And at the moment I am fortunate enough to be one of those with too much work :) So I can't really tell you where or exactly what to use. The following is the code you place anywhere to access WS only functions. This will be a good start to your project. Cheers,
PHP Code:
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") {
//your code
}
}
//note*** depending on where you use this you might have to change $db-> to $this->
-
Re: DUAL Pricing version 2
OK I just encountered something very weird ... my wholesale pricing has stopped taking entries .. is there a ceiling on how many products a store can have as far as wholesale pricing goes?
I can not change any current prices .. it will not change and if I insert a new product, it will take it and the retail price .. but wholesale now comes up 0
Any idea's????
I just checked my product count and it is 2915
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Elle Fresco
OK I just encountered something very weird ... my wholesale pricing has stopped taking entries .. is there a ceiling on how many products a store can have as far as wholesale pricing goes?
I just checked my product count and it is 2915
I have 3310 products and wholesale pricing is still working great for me.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Elle Fresco
I can not change any current prices .. it will not change and if I insert a new product, it will take it and the retail price .. but wholesale now comes up 0
Sorry to hear about this. I assume you mean that you can type into the WS field but once you update the product the WS price is not updated and a default of '0' is shown.
Have you made any changes to your admin files? Is there another module you used recently that would write over or modify the admin files, update_product.php or collect_info.php files? I would make sure that these two files contain all the needed Dual Pricing elements.
Cheers,
-
Re: DUAL Pricing version 2
Hey guys,
Just installed your module, which was a simple process.
I found however that I get this error when editing a product:
Warning: Missing argument 1 for FCKeditor::__construct(), called in htdocs\admin\includes\modules\product\collect_info.php on line 413 and defined in htdocs\admin\includes\fckeditor_php5.php on line 42
Obviously it's caused a conflict between FCKeditor and dual pricing. I searched this thread and there seems to be nothing on it.
Ta.
-
Re: DUAL Pricing version 2
Edit: It's ok sorry, I found the solution.
1) Open up admin/includes/modules/product/collect_info.php and if you have the FCKeditor install files at hand, open the same file from those folders too.
2) Look at lines 402 - 423 (pretty much <tr> to </tr>) and copy the text from the fckeditor file to the current file.
3) Should be sorted!
There was already FCKeditor code there, but I assume the Dual Pricing creators haven't updated the code according to FCK's latest version.
-
Re: DUAL Pricing version 2
Hi again! 3rd post in like an hour.
My problem with FCKeditor was sorted, but now I get one with easypopulate :(:
Fatal error: Call to a member function query() on a non-object in htdocs\admin\includes\functions\extra_functions\easypopulate_functions.php on line 421
Which has only started appearing after installing this module.
Your help would be great.
Thanks!
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
thomasharding
My problem with FCKeditor was sorted, but now I get one with easypopulate :(
Thanks!
There is a new file for easy populate included in the packaging for this file. i know several others are using the two together and it should work.
As far as avoiding these problems in the first place I'd look into using WinMerge to merge files that are edited by modules so as to avoid writing over important code from one with another.
Cheers,
-
Re: DUAL Pricing version 2
Via, PM
Quote:
Everything works fine after i installed. But I have an enquiry that is when WS customer logged in, can they view the Wholesale Price only instead of showing both Retail and Wholesale price?
There are two different options.
1) If you still want the labeling or the change in labeling (ie "Retail Price" or "Whole Sale Price" depending on customers login level). note out the modified parts of tpl_product_info_display.php between the two notes on lines 70-76.
2) If you don't care about the labeling and just want the change in price. Just don't upload the tpl_product_info_display.php file. The price will change without any more issue.
Cheers,
-
Re: DUAL Pricing version 2
Hello everybody,
I just uploaded V1.5 this is a simple upgrade but is in response to trying to decrease server load on a site. This will cut down significantly on the amount of Database queries that take place while a logged in customer browses a site using this module. I'd recommend upgrading to this to increase overall site performance. Next look for "send email" compatibility to all or different levels of WS customers.
Cheers,
-
Re: DUAL Pricing version 2
I think that this mod is great, but maybe i'm not great enough for it.
I've installed it, i can see the right prices (retail and wholesale) in the catalogue but when I add the product to my cart, it ever shows the retail price, even if i'm a wholesaler.
Can anybody help me, please?
thank you
Ligrex
P.S.
I'sorry for my bad english, I hope you can understand me!!!
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
ligrex
I've installed it, i can see the right prices (retail and wholesale) in the catalogue but when I add the product to my cart, it ever shows the retail price, even if i'm a wholesaler.
Ligrex, What version of ZC are you running? What version of the module are you running? Do you have any other modules that affect the shopping cart pages?
Cheers,
-
Re: DUAL Pricing version 2
Thank you for your attention.
I use
Zen Cart 1.3.8a
dual_pricing_1.5
and... i really can't understand... but at the moment it seems to work great...
I think that the problem was with the session variables....
I shut down the browser, restart the pc... and the day after it started to work...
Thank you so much the same...
And best regards for your job!!!
(i'm afraid my english is getting worse....:oops:)
:smile:
By,
ligrex
-
Re: DUAL Pricing version 2
I'm glad you got everything working out... Mystery problems are always best when easily solved, with mystery solutions.
Cheers,
P.S. don't worry about the English, if I cared I wouldn't be excited to work in a global community. And I'm sure I'm far worse at your native language.
-
Re: DUAL Pricing version 2
Hi There:
Thanks a million for this contribution... what a lifesaver.
I was wondering if you can tell me what I might be doing wrong. For some reason, I cannot seem to get the text to change depending on if the person logged in has a wholesale account or not.
I would like it to read "WholeSale Price" or "Retail Price" as it should be doing, but no matter what I do, it always reads Retail Price. I took a look at the code in tpl_product_info_display.php in the templates directory and it should work, but doesn't.
Here is the code from my template file:
PHP Code:
//*********************************************************************************
//***Properly display price labeling when set to Whole sale and when not
//*********************************************************************************
if ($_SESSION['customers_whole'] && $_SESSION['customers_whole'] != '0' ) {
echo '<span id="whole">WholeSale 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
//*********************************************************************************
I checked my database and there is an entry for "customers_whole" in the zen_customers table. Originally the file was marked "customer_whole", note the lack of the 's'. So I made the modification here. But it still doesn't work. Perhaps I don't understand how the $SESSION widget works to troubleshoot further.
Can you point me in a place to check?
Thanks,
Ed
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
ewodzien
I checked my database and there is an entry for "customers_whole" in the zen_customers table. Originally the file was marked "customer_whole", note the lack of the 's'. So I made the modification here. But it still doesn't work. Perhaps I don't understand how the $SESSION widget works to troubleshoot further.
Ed, the table in the DB should be names "customers_whole" and the $_SESSION should be named "customer_whole" without the "s." This is just the difference in naming conventions Zen-Cart likes to keep plural table names so I stick to that for the DB. But in my writing it doesn't help me to stick to a plural $_SESSION name when I'm only referring to one customer. All right enough explanation there, but all in all the module will never work with the table named "customer_whole" change it back to "customers_whole."
Is the price changing according to the customer's login level? I'd check the includes/modules/pages/login/header_php.php file and see if it's uploaded correctly or properly saved. Next I'd log out of Zen Cart make sure your test customer is set to a whole sale level and then log back in and retest. Let me know if this helps.
Cheers,
-
Re: DUAL Pricing version 2
Thanks for your help.. you pointed me in the right direction and I was able to get it fixed!
I actually had two issues going on..
The first was that I somehow missed the file you mentioned to look at, header_php, I didn't update that file with your changes.
So, I did that, but when I did, I can into problem #2, which was I missed the database statement
PHP Code:
$_SESSION['customer_whole'] = $check_customer->fields['customers_whole'];
in the file which loaded the test variable into the SESSION array.
The reason I missed it was because I am running on v1.37 and have the master password contribution installed, so the changes were not easy to spot.
Luckily with your help, I was able to zone in on the file causing the issue.
So.. THANK YOU!!! I'm all fixed up now.
-Ed
Quote:
Originally Posted by
madfastride
Ed, the table in the DB should be names "customers_whole" and the $_SESSION should be named "customer_whole" without the "s." This is just the difference in naming conventions Zen-Cart likes to keep plural table names so I stick to that for the DB. But in my writing it doesn't help me to stick to a plural $_SESSION name when I'm only referring to one customer. All right enough explanation there, but all in all the module will never work with the table named "customer_whole" change it back to "customers_whole."
Is the price changing according to the customer's login level? I'd check the includes/modules/pages/login/header_php.php file and see if it's uploaded correctly or properly saved. Next I'd log out of Zen Cart make sure your test customer is set to a whole sale level and then log back in and retest. Let me know if this helps.
Cheers,
-
Re: DUAL Pricing version 2
Just installed DP1.5 to Zen Cart 1.3.8a.
I tested by setting a customer wholesale level to 1 and set a few products product to have only one wholesale price level.
When I log in as the wholesale customer, I have a couple of problems:
1. All prices shown on the front page and product info page are RETAIL price.
Only if I add the item to shopping cart, then the price in the shopping cart page will show wholesale price.
2. If a product has discount(specials) for retail price AND wholesale price... the product added to shopping cart will follow the discounted RETAIL price, not the wholesale price.
Any ideas/suggestions what I did wrong?
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
yonghs
1. All prices shown on the front page and product info page are RETAIL price.
You should log out, and log back in. The new release uses session and the cart won't work properly without them. If that doesn't work read a few posts back and check the login/header_php.php file, make sure it's uploaded.
Quote:
Originally Posted by
yonghs
2. If a product has discount(specials) for retail price AND wholesale price... the product added to shopping cart will follow the discounted RETAIL price, not the wholesale price.
I don't understand this. Can you explain more. I don't remember a way to add specials to the WS price. If the discount is below the WS price the special will show for WS customers, if it's above the WS price then it's shopping as usual.
-
Re: DUAL Pricing v. 2 problem
what had you done wrong? I don't have the wholesale box under the email address.
Quote:
Originally Posted by
bluealice
I installed the module, everything is in the right place, installed the SQL patches,
but i don't see the following (mentioned in the Read Me file):
Pick a customer and edit them.
You will see a new text box under the email address box.
I don't have this (a box under the email address.)
Any ideas what I've done wrong?
Was I supposed to install the earlier versions first and then add V.2?
PS: I'm not using group pricing.
-
Re: DUAL Pricing version 2
Not for lack of trying, I cannot make the wholesale price box show up in my admin/products. I can indicate customers as wholesale, but nothing in the products. I found similar posts, but everyone seems to figure it out on their own.
I have read every post in this whole thread which made for a crappy sunday, but I have exhausted myself. I have uninstalled and re-installed. So please pardon my stupidity - I need help.
Zen Cart 1.3.8a
DP 1.5
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Ted_Heople
Not for lack of trying, I cannot make the wholesale price box show up in my admin/products. I can indicate customers as wholesale, but nothing in the products. I found similar posts, but everyone seems to figure it out on their own.
I have read every post in this whole thread which made for a crappy sunday, but I have exhausted myself. I have uninstalled and re-installed. So please pardon my stupidity - I need help.
Zen Cart 1.3.8a
DP 1.5
It should be at the bottom of the light blue box. The field is labeled "Wholesale Price (Net)" It is controlled by "admin/includes/modules/products/colect_info.php" Make sure that the correct version of this file is uploaded.
-
Re: DUAL Pricing version 2
Thanks so much for that. The file in question was there and I had re-installed it a couple times. In retrospect I think that it may have been a corruption issue. The downloaded files including the text files were crashing me. So a corrupt download was probably the problem. I deleted the first download and re-downloaded it, re-copied the files over and what-do-you-know! Working!
-
Re: DUAL Pricing version 2
Hi there
I installed the latest version of Dual Pricing on zencart 1.38 and it works great besides one thing:
I can't make the attributes work!
I'm not using "Pricing By Attributes" (that means that the product's price doesn't matter - all the prices come from the attributes). Instead I do have a main price for the product and when the product has attributes the price is being adjusted to the right price (like +1.50$ or something like that).
I couldn't figure out how to make it work. Where and how do I put the wholesale price for attributes? at the attributes controller? I tried using commas(,) and dashes (-) but nothing works, it doesn't even save more than one price....
Did somebody got it work good with the attributes?
Thanks for this great module and i'll appreciate any help I can get.
Thanks
-
Re: DUAL Pricing version 2
I have the Dual Pricing addon working fine, except I was wondering how to get rid of the "Starting at:" After the Retail Price: and Wholesale Price:? My Product Info page looks like this.
Retail Price: Starting at: $299.99
Wholesale Price: Starting at: $299.99
I went in and blanked out the Starting at: in the english.php file
define('TEXT_BASE_PRICE','Starting at: ');
So it does show up correctly, but was wondering how to fix the tpl_product_info_display.php file to get rid of the 'TEXT_BASE_PRICE' in the pricing. Please let me know. Thanks
-
Easy populate
So if I am going to use Easy Populate to upload all my wholesale prices, what variable do I use in the header row? Ie, v_xxxx_xxxx
Thanks!
-
Re: DUAL Pricing v2
What I like to do is create one product manually -- in this case, do the manual setup of the two prices -- then I download the data using EP and see what I got. This makes it foolproof (except that fools are getting better) to add your data into the right column.
Rob
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
eist1
So it does show up correctly, but was wondering how to fix the tpl_product_info_display.php file to get rid of the 'TEXT_BASE_PRICE' in the pricing. Please let me know. Thanks
You don't need to modify any files. Go to Admin > Catalog > Product Types, The layout you probably want to change is "Product - General" go to edit layout and change "Show Starting At text on Price" to "0". That will remove it.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
YairOz
I installed the latest version of Dual Pricing on zencart 1.38 and it works great besides one thing:
I can't make the attributes work!
YairOz, sorry but I can't really help. I just rolled all the Attribute functions over, I really don't like this aspect of ZC and do everything I can to avoid it. So I'm not to familiar with what's going on there.
The one thing I've noticed supporting this though is that 95% of functionality problems is do to FTP transfers not working properly. Double and triple check all your files.
-
Re: DUAL Pricing v2
hy everyone!
i can't seem to find the answer in previous posts so...
how do i set up my site so that all customers after registration automatically get Wholesale pricing level 1?
BTW, great mod, saved me... BIG thanx to the author!
-
Re: DUAL Pricing v2
Quote:
Originally Posted by
balihr
how do i set up my site so that all customers after registration automatically get Wholesale pricing level 1?
The easiest way I can think to set that up would be to change the default entry in the MySQL data base, that way a customer will receive Pricing level 1 automatically.
*** Backup your database!!!! ***
Use this line to delete the current SQL formatting:
ALTER TABLE `customers` DROP `customers_whole` ;
Use this to re-insert the column with the new setting:
ALTER TABLE `products` ADD `products_price_w` VARCHAR( 150 ) DEFAULT '1' AFTER `products_price`;
-
Re: DUAL Pricing v2
it doesn't work. I get an error trying to log in. Unfortunately, i wasn't thinking because i had 17 customers online when it crashed and restored my db before i got to copy the error message... :frusty:
anyway, there was something like an error in db field regarding customers. SORRY... :blush:
any other ideas, maybe?
-
Re: DUAL Pricing v2
Quote:
Originally Posted by
balihr
it doesn't work. I get an error trying to log in. Unfortunately, i wasn't thinking because i had 17 customers online when it crashed and restored my db before i got to copy the error message... :frusty:
anyway, there was something like an error in db field regarding customers. SORRY... :blush:
any other ideas, maybe?
Okay, should have worked... I tested it on a cart but no big deal... Remember it's always best to have a development cart as a backup... That way your site doesn't go down like that. Try modifying your includes/modules/create_account.php file on lines 256-257 Add a new line so it looks like this:
PHP Code:
'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION,
'customers_whole' => 1
);
This will automatically add the value into the DB upon account creation... Go back and manually update all your customers.
-
Re: DUAL Pricing v2
I know i should have a development cart and i used to have one, but... I accidentally erased it from my server and didn't have the time to set it up again.
Anyway, this code still doesn't work. i did what you said and registered myself as a new user, but in admin i have Wholesale = 0. I still have to set it manually to 1.
Maybe there's a problem with using a template? I'm using gloss_black.
I you want to check for yourself, the site is www.bali.hr
-
Re: DUAL Pricing v2
Sorry I forgot that customers_whole is a varchar not an int value. which makes no sense to me but I haven't had the chance to change it yet... So here's the new code this will work, promise :)
PHP Code:
'customers_authorization' => (int)CUSTOMERS_APPROVAL_AUTHORIZATION,
'customers_whole' => '1'
);
The only difference is that now the value for customers_whole is enclosed in single quotes.
-
Re: DUAL Pricing v2
Noup, still the same... :cry:
After registration I still have to manually assign wholesale level 1.
Any other ideas?
-
Re: DUAL Pricing v2
Oh, BTW, one more question.
My English isn't that good so I have to describe the situation first.
A new customer creates an account. I change his account to Wholesale level = 1 immediately. He is still online and hasn't logged of. He doesn't get wholesale level 1 prices until he logs of and logs back in.
I would like the change to become effective immediately without log-off. Is that possible?
-
Re: DUAL Pricing v2
Quote:
Originally Posted by
balihr
Maybe there's a problem with using a template? I'm using gloss_black.
Is your cart using a template override for the file? If it is you would have a file located in the includes/modules/gloss_black/create_account.php and that's the one you would need to be changing.
The change I made makes a customers whole sale status equal to level one automatically. I checked it on my server and it seems to be working...
Quote:
Originally Posted by
balihr
A new customer creates an account. I change his account to Wholesale level = 1 immediately. He is still online and hasn't logged of. He doesn't get wholesale level 1 prices until he logs of and logs back in.
I would like the change to become effective immediately without log-off. Is that possible?
Yes that is possible. Install the next oldest version of this module. The draw back is that that version requires a lot more DB queries to work.
If your host has it you could try logging into PHPMyAdmin and working with it in there. you'd be changing the default value for customers_whole in your customers table to 1.
-
Re: DUAL Pricing v2
:frusty::frusty::frusty: I have a lot of learning left to do... I obviously didn't understand the basics of overriding. And i thought I did. :cry:
Yes, that's it! The file was in my gloss_black folder and i edited the default (basic) one. Sorry.
Just for the record - you're my hero! :smile: Thank you.
I'll try the other version in a few days. That would be 1.4.2, right? I'll come back with the results.
-
Re: DUAL Pricing v2
No worries... we all can learn a lot.
-
Re: DUAL Pricing v2
Just installed version 1.4.2.
Now it is exactly what i wanted! Immediately after registration my customers get wholesale level 1 and are able to see their prices right away.
It's incredible how this mod affects my sale...
All I can say to Madfastride is :clap::clap::clap::clap::clap:
Thank you very much! I only wish there were more people like you...
-
Re: DUAL Pricing v2
I just installed zc 1.38a and ultimate seo urls 2.107 (http://www.zen-cart.com/index.php?ma...roducts_id=231) and just tried to install Dual Pricing 1.5. I am getting blank pages on the front end. Everything in the admin section seems to work and the wholesale pricing shows up, but a category with only one product goes blank, the login screen goes blank, as does the shopping cart screen. Has anyone had this problem (completely blank white screen) or does anyone have ultimate seo and dual pricing installed together?
-
Re: DUAL Pricing v2
Quote:
Originally Posted by
jwatt10k
I just installed zc 1.38a and ultimate seo urls 2.107 (
http://www.zen-cart.com/index.php?ma...roducts_id=231) and just tried to install Dual Pricing 1.5. I am getting blank pages on the front end. Everything in the admin section seems to work and the wholesale pricing shows up, but a category with only one product goes blank, the login screen goes blank, as does the shopping cart screen. Has anyone had this problem (completely blank white screen) or does anyone have ultimate seo and dual pricing installed together?
The problem you are having and the solution is found here https://www.zen-cart.com/tutorials/index.php?article=82
Also, the two modules do work together.
-
Re: DUAL Pricing v2
me again... :blush:
so far i'm very satisfied with this mod, but i'd like to try something new.
i want customers to see both regular price and wholesale_1 price without login. if a customer doesn't log in, regular prices apply and if (s)he logs in, whole_1 prices apply.
also, what would be nice... A guest is on product_info page and sees "Regular price" and "Members price". A member is on product_info page and sees "Regular price" and "Your price".
-
Re: DUAL Pricing v2
My wholesale pricing was working fine. now I cannot find where to change the customer to level 1 when I edit their account. this is the frist time I had a wholesale customer in a while.
The dual pricing was added in Oct. it was working ok. site: www---currysgiftshop com
-
Re: DUAL Pricing v2
I reuploaded all the files, because I really installed the dual pricing in sept and I saw a update for Oct. Now when I edit a customer I can change to wholesale. my test customer. cannot login they get a HTTP 406 Internet Explorer cannot read this webpage format. now I don't know what to do.
-
Re: DUAL Pricing v2
Can someone please help me with this problem. After reinstalling the dual pricing, I got a message that the tables already exist. I made a ticket for my host to check out the HTTP 406 Not Acceptable. The reply was "I see that the domain is hitting a mod_security rule." they fix that but I was still getting the HTTP 406 I sent them a test login. This is the reply I got back.
"I checked the site and it looks like it is being caused by a coding issue The url is trying to send the value for zenid twice. If I remove the second one, and just go to the url I am able to login. Have you tried talking to the script author about this?
This is the login url:
https:// www.currysgiftshop.com/index/? zenid=e3e89998f3972f5f8aa68185d7194694?zenid=e3e89998f3972f5f8aa68185d7194694.
I don't know if I am In right place. as far as I know it didn happen until I redownload dual pricing. I also have the simple seo.
-
Re: DUAL Pricing v2
weezee,
I looked at my copy of the file that is sending the customer_id headers and I can't seem to find anything that would be setting the value twice. Maybe you could send me a copy of your file located at includes/modules/pages/login/header_php.php
Cheers
-
Re: DUAL Pricing v2
I tried to send this to you but it was to many characters, I didn't know what else to do but post it here:
<?php
/**
* Login Page
*
* @package page
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: header_php.php 6783 2007-08-23 21:16:16Z wilt $
*/
// This should be first line of the script:
$zco_notifier->notify('NOTIFY_HEADER_START_LOGIN');
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if ($session_started == false) {
zen_redirect(zen_href_link(FILENAME_COOKIE_USAGE));
}
// if the customer is logged in already, redirect them to the My account page
if (isset($_SESSION['customer_id']) and $_SESSION['customer_id'] != '') {
zen_redirect(zen_href_link(FILENAME_ACCOUNT, '', 'SSL'));
}
require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_CREATE_ACCOUNT));
$error = false;
if (isset($_GET['action']) && ($_GET['action'] == 'process')) {
$email_address = zen_db_prepare_input($_POST['email_address']);
$password = zen_db_prepare_input($_POST['password']);
/* Privacy-policy-read does not need to be checked during "login"
if (DISPLAY_PRIVACY_CONDITIONS == 'true') {
if (!isset($_POST['privacy_conditions']) || ($_POST['privacy_conditions'] != '1')) {
$error = true;
$messageStack->add('create_account', ERROR_PRIVACY_STATEMENT_NOT_ACCEPTED, 'error');
}
}
*/
if ((!isset($_SESSION['securityToken']) || !isset($_POST['securityToken'])) || ($_SESSION['securityToken'] !== $_POST['securityToken'])) {
$error = true;
$messageStack->add('login', ERROR_SECURITY_ERROR);
} else {
// Check if email exists
$check_customer_query = "SELECT customers_id, customers_firstname, customers_lastname, customers_password,
customers_email_address, customers_default_address_id,
customers_authorization, customers_referral, customers_whole
FROM " . TABLE_CUSTOMERS . "
WHERE customers_email_address = :emailAddress";
$check_customer_query =$db->bindVars($check_customer_query, ':emailAddress', $email_address, 'string');
$check_customer = $db->Execute($check_customer_query);
if (!$check_customer->RecordCount()) {
$error = true;
$messageStack->add('login', TEXT_LOGIN_ERROR);
} elseif ($check_customer->fields['customers_authorization'] == '4') {
// this account is banned
$zco_notifier->notify('NOTIFY_LOGIN_BANNED');
$messageStack->add('login', TEXT_LOGIN_BANNED);
} else {
// Check that password is good
if (!zen_validate_password($password, $check_customer->fields['customers_password'])) {
$error = true;
$messageStack->add('login', TEXT_LOGIN_ERROR);
} else {
if (SESSION_RECREATE == 'True') {
zen_session_recreate();
}
$check_country_query = "SELECT entry_country_id, entry_zone_id
FROM " . TABLE_ADDRESS_BOOK . "
WHERE customers_id = :customersID
AND address_book_id = :addressBookID";
$check_country_query = $db->bindVars($check_country_query, ':customersID', $check_customer->fields['customers_id'], 'integer');
$check_country_query = $db->bindVars($check_country_query, ':addressBookID', $check_customer->fields['customers_default_address_id'], 'integer');
$check_country = $db->Execute($check_country_query);
$_SESSION['customer_id'] = $check_customer->fields['customers_id'];
$_SESSION['customer_default_address_id'] = $check_customer->fields['customers_default_address_id'];
$_SESSION['customers_authorization'] = $check_customer->fields['customers_authorization'];
$_SESSION['customer_first_name'] = $check_customer->fields['customers_firstname'];
$_SESSION['customer_last_name'] = $check_customer->fields['customers_lastname'];
$_SESSION['customer_country_id'] = $check_country->fields['entry_country_id'];
$_SESSION['customer_zone_id'] = $check_country->fields['entry_zone_id'];
$_SESSION['customer_whole'] = $check_customer->fields['customers_whole'];
$sql = "UPDATE " . TABLE_CUSTOMERS_INFO . "
SET customers_info_date_of_last_logon = now(),
customers_info_number_of_logons = customers_info_number_of_logons+1
WHERE customers_info_id = :customersID";
$sql = $db->bindVars($sql, ':customersID', $_SESSION['customer_id'], 'integer');
$db->Execute($sql);
$zco_notifier->notify('NOTIFY_LOGIN_SUCCESS');
// bof: contents merge notice
// save current cart contents count if required
if (SHOW_SHOPPING_CART_COMBINED > 0) {
$zc_check_basket_before = $_SESSION['cart']->count_contents();
}
// bof: not require part of contents merge notice
// restore cart contents
$_SESSION['cart']->restore_contents();
// eof: not require part of contents merge notice
// check current cart contents count if required
if (SHOW_SHOPPING_CART_COMBINED > 0 && $zc_check_basket_before > 0) {
$zc_check_basket_after = $_SESSION['cart']->count_contents();
if (($zc_check_basket_before != $zc_check_basket_after) && $_SESSION['cart']->count_contents() > 0 && SHOW_SHOPPING_CART_COMBINED > 0) {
if (SHOW_SHOPPING_CART_COMBINED == 2) {
// warning only do not send to cart
$messageStack->add_session('header', WARNING_SHOPPING_CART_COMBINED, 'caution');
}
if (SHOW_SHOPPING_CART_COMBINED == 1) {
// show warning and send to shopping cart for review
$messageStack->add_session('shopping_cart', WARNING_SHOPPING_CART_COMBINED, 'caution');
zen_redirect(zen_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'));
}
}
}
// eof: contents merge notice
if (sizeof($_SESSION['navigation']->snapshot) > 0) {
// $back = sizeof($_SESSION['navigation']->path)-2;
//if (isset($_SESSION['navigation']->path[$back]['page'])) {
// if (sizeof($_SESSION['navigation']->path)-2 > 0) {
$origin_href = zen_href_link($_SESSION['navigation']->snapshot['page'], zen_array_to_string($_SESSION['navigation']->snapshot['get'], array(zen_session_name())), $_SESSION['navigation']->snapshot['mode']);
// $origin_href = zen_back_link_only(true);
$_SESSION['navigation']->clear_snapshot();
zen_redirect($origin_href);
} else {
zen_redirect(zen_href_link(FILENAME_DEFAULT, '', $request_type));
}
}
}
}
}
if ($error == true) {
$zco_notifier->notify('NOTIFY_LOGIN_FAILURE');
}
$breadcrumb->add(NAVBAR_TITLE);
// Check for PayPal express checkout button suitability:
$paypalec_enabled = (defined('MODULE_PAYMENT_PAYPALWPP_STATUS') && MODULE_PAYMENT_PAYPALWPP_STATUS == 'True');
// Check for express checkout button suitability:
$ec_button_enabled = ($paypalec_enabled && ($_SESSION['cart']->count_contents() > 0 && $_SESSION['cart']->total > 0));
// This should be last line of the script:
$zco_notifier->notify('NOTIFY_HEADER_END_LOGIN');
?>
I uninstalled the dual pricing and installed it again . now I only have one url it so slow it times out.
I found some .htaccess I don't know what they mean. one in my Public HTML and one in my Include folder.# $Id: .htaccess 1105 2005-04-04 22:05:35Z birdbrain $
#
# This is used with Apache WebServers
# The following blocks direct HTTP requests in this directory recursively
#
# For this to work, you must include the parameter 'Limit' to the AllowOverride configuration
#
# Example:
#
#<Directory "/usr/local/apache/htdocs">
# AllowOverride Limit
#
# 'All' with also work. (This configuration is in your apache/conf/httpd.conf file)
#
# This does not affect PHP include/require functions
#
# Example: http://server/catalog/includes/application_top.php will not work
<Files *.php>
Order Deny,Allow
Deny from all
</Files>
and
public Html:
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/currye/php.ini
<Files php.ini>
order allow,deny
deny from all
</Files>
</IfModule>
I know this is very long but if you could get someone to remove it.
Thanks.
-
Re: DUAL Pricing version 2
I love this mod! I have a question though. I'm using some quantity discounts set up in the admin section but I don't want it to apply to my wholesale customers. How do I do that? I only want the quantity discounts to apply to full retail customers. Can anyone help me here?
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
rleepac
I love this mod! I have a question though. I'm using some quantity discounts set up in the admin section but I don't want it to apply to my wholesale customers. How do I do that? I only want the quantity discounts to apply to full retail customers. Can anyone help me here?
I figured it out. I don't know if it's the right way, but I added an attribute for the qty like "case of 12" and then in the trade box I put the wholesale prices. Retail customers would pay 15.00 and in the trade box for my 2 levels of wholesale customers I put 10.92,12.67 and that did the trick.
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
Veronika7747
i found it.. one line in shopping_cart.php ...
How exactly did you fix this? I'm having the same issue...
Thanks in advance!
-
Re: DUAL Pricing version 2
Quote:
Originally Posted by
rleepac
How exactly did you fix this? I'm having the same issue...
Thanks in advance!
I don't know if a response is coming since that post was over a year ago. I'd start by checking all you lines of code in your shopping_cart.php file. Are you using something like WinMerge or moving the entire file over?
Cheers
-
Re: DUAL Pricing v2
How do I dis-allow my wholesale customers from receiving quantity discounts? I only want those to apply to the retail customers.
Thanks!
-
Re: DUAL Pricing v2
Quote:
Originally Posted by
rleepac
How do I dis-allow my wholesale customers from receiving quantity discounts? I only want those to apply to the retail customers.
Thanks!
Rleepac, you need to find the part of ZC's code that controls the quantity discount and wrap an if statement around it that excludes WS customers. This can be complicated and as I've never dealt with it I can't tell you exactly where to begin.
The if statement you will be using will be something like this.
PHP Code:
if (!$_SESSION['customer_whole'] || $_SESSION['customer_whole'] == '0' ) {
//Quantity Discount code here
}
Hope that gets you off to a good start. Cheers,