Can someone please send me the DUAL Pricing mod WITH MySQL DB table file update. I can not find it anywhere and the downloaded mod does not include the sql update.
May thanks
Printable View
Can someone please send me the DUAL Pricing mod WITH MySQL DB table file update. I can not find it anywhere and the downloaded mod does not include the sql update.
May thanks
Not to worry. There is a new version for 1.3.8 !!! and it works
Just a little update. Adoy's problem was fixed by using the files in the 1.3.2 release. Currently I am for some reason having troubles uploading this to the proper Download section :huh: and there for in the meantime it is available at my web site.
I thought it was working..but its not.
I can see the wholesale section when I am adding products etc.
Problem is with my products, customer has to upload an image. So when you go to create an attribute to upload 'file' section, Category shows but not the product it self. Its not selectable (viable) from the drop down in the Options manager. When I add the attribute I get an error message
Any ideas please?
----------------------------
1136 Column count doesn't match value count at row 1
in:
[insert into zen_products_attributes (products_attributes_id, products_id, options_id, options_values_id, options_values_price, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required) values (0, '2', '1', '0', '0', '0', '+', '0', '1', '0', '+', '0', '0', '1', '', '1', '0', '0', '0', '0', '0', '', '', '0', '0', '0', '0', '0')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
----------------------------------------------------------
I'm having the same error now when adding a new attribute. I tried some of the fixes suggested in this thread but it still doesn't work: would appreciate if any one can help?
The problem comes because dual prices/wholesale pricing adds a field to the attributes table.
admin/includes/functions/general.php
after line 1914 ish:
Code:
'" . $products_copy_from->fields['options_values_price'] . "',
add:
Code:
'" . $products_copy_from->fields['options_values_price_w'] . "',
after line 1943 ish:
Code:
options_values_price='" . $products_copy_from->fields['options_values_price'] . "',
add:
Code:
options_values_price_w='" . $products_copy_from->fields['options_values_price_w'] . "',
For those suffering with this error when adding attributes to an item and who have followed the various fixes, I discovered that in the admin/attributes_controller.php in or around 255 the value options_values_price_w was missing from the list after adding it I didn't get the error again.
Now it is transferring the "retail" price to the cart rather than the w/s price, but I think there is a thread somewhere with that problem.
$db->Execute("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " (products_attributes_id, products_id, options_id, options_values_id, options_values_price, options_values_price_w, price_prefix, products_options_sort_order, product_attribute_is_free, products_attributes_weight, products_attributes_weight_prefix, attributes_display_only, attributes_default, attributes_discounted, attributes_image, attributes_price_base_included, attributes_price_onetime, attributes_price_factor, attributes_price_factor_offset, attributes_price_factor_onetime, attributes_price_factor_onetime_offset, attributes_qty_prices, attributes_qty_prices_onetime, attributes_price_words, attributes_price_words_free, attributes_price_letters, attributes_price_letters_free, attributes_required)
Oavs,
-Which version of Zen Cart are you using?
-Which version of the Dual Pricing are you using?
Decostyle,
-Again which versions are you using?
-I can't find any version of DP in which admin/includes/functions/general.php is modified, am I missing something?
madfastride
I am using Zencart 1.3.8.a with DUAL Pricing version 2 currently in the download section of the zen.
Since then I have painfully gone through re installing my zencart as I have tried varies versions with different people after reading the forum and got really stuffed up. So regrettably I have uninstalled it. I am now using Group pricing which I am about the test but I really like the idea of DUAL Pricing version 2 ...if it worked.
I hope someone with a good knowledge, fixes, testes and name the booming thing version 4 or some other name so that there is no confusion. (well I am confused anyway)
So there it is. I will not re install it as many had bad experiences with this mod and I can see some people are keeping right out of it.
I hope this will change so we can use it.
Cheers
Hi there,
I am amazed by Zen Cart and the DUAL pricing mod. Both are working fine for me so far. I am only wondering if there is an easy way to let the wholesale customers know that they have to pay an additional sales tax (e.g."plus GST"). Could this message appear next to the price (or alternatively as permanent header/when they log in)?
... till later ...
Matt
Matt, Which one do you want to do? You could modify the wording of "Whole Sale Price:" to something more suitable on line 94 of includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
The other method would be to add another check for a whole sale customer and display a notice in the header. This would probably happen in your includes/header.php file or your could use the messageStack feature built into Zencart (gives a notice like when you forget to delete your install directory).
The code to check for a wholesale customer looks like this. You can change your template to display a notice anywhere you want using this in any file you chose.
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") {
CODE YOU WANT TO USE IF CUSTOMER IS WHOLE SALE
}
}
Hi madfastride,
thank you for your immediate solution.
I was missing that file in my current template (method one).
I changed the original file by adding "plus GST" and uploaded it.
Now everything works fine.
Wholesalers can even see the retailprice at the same time.
... till later ...
Matt
I downloaded the new dual pricing version 2 from the zen website and i am using zen cart 1.3.8a got everything installed including the sql. I can see the new box when editing customers and if i put that to 1 that means that customer once logged on will get whole sale pricing right? Well then i went to the product and under whole sale pricing adding a price "$2.40" Something like that. I didnt do the dashes because i only need one whole sale pricing, at least at the moment. I logged on as the user and i see no difference. I have gone all the way through the check out process. I would like to be able to have this where i can have a retail price and wholesale price so when the user logs on they will immediately see the price they will pay in the category view, product listing and everywhere. Is this possible. Please anyone have some info on what i could be doing wrong. Thanks
Try not adding the "$" it should work then. If there are other problems it could be in the install. Double check that this file is correct and make sure to place it in the folder of the template you are currently using where the file says "YOUR_TEMPLATE"; includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php
This is the way this module works so if you can get it running you will be golden.
Hi all,
I desperately need to figure out SOME way to get this done, and I'm sure there has to be a solution somewhere...I just can't figure it out.
Dual Pricing works *great* for one thing we need, which is just wholesale pricing for our retail customers. However, here's the problem. We need regular customers to be able to order whatever number of units (usually it will be 1 only of a product), but wholesalers must only be able to order units in multiples of 4 (our wholesale 'packs') or 6 in the case of one product.
I am thinking maybe some combination of Dual Pricing with Product Qty Units, although i'm all for another solution if there is one.
I know enough PHP to get around, but not Zen Cart as of yet and am still learning how it works. I know basically I need to find a way to display one ordering option to regular customers and another to retailers/wholesale in multiples of a specified number.
Is there some way I can achieve this?
Thanks!
Skye
When I was first setting up a Zen version of our sites, I put a lot of thought into making just one site that could handle both retail and wholesale customers. I ended up not doing it. As you can see from the links below, we have completely separate retail and wholesale sites.
In our case we use separate domain names, since both names had been on the web for years and were high in Google. But I believe the same thing could be done using a single domain and the domain style used by so many large companies. For example, www .apple.com, developer.apple.com, and_so_on.apple.com.
So you could have retail.skye.com and wholesale.skye.com, both under www .skye.com (or whatever your domain is.)
You'd then have a full install of ZC in each part of the site, with separate prices and minimums and sales and whatever else you need.
HTH
Rob
I'm really hoping to not have to do this, but it may be the best solution in the end. Mostly I'm concerned with setting my clients up with multiple admin panels, multiple databases, two places to update/change products etc, though in the end it will allow all the flexibility we need on the front end.
I started digging deeper in the code, it's a bit intimidating for my skill level, but maybe I can write something to take care of this.
I don't want to go start implementing a different cart, but are there others that are more flexible in this arena of wholesale/quantities/etc support?
Looks like your on the right path. The code you have question about and can't get working does work.
I've done several customizations of this module wrapping that code around different elements. You will need to wrap it around portions of Product Qty Units so that it is only activated when a whole sale customer is logged in. As far as the troubles your having with that code try turning on strict error reporting to see what the actual problem is with the site. To do this create the file YOUR_DOMAIN/includes/local/configure.phpPHP 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
}
}
?>
and place in the file the following code
Reload the page your having troubles with and sort through all the errors. The fatal error is the one breaking your site (Inherently the last error). Check to see if you can fix that. Remember to delete or note out the define() line once you're done so that the errors aren't always showing.PHP Code:
<?php
define('STRICT_ERROR_REPORTING', true);
?>
Can someone please tell me were I'm to insert
ALTER TABLE `customers` ADD `customers_whole` VARCHAR( 4 ) DEFAULT '0' NOT NULL;
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`;
in the sqlpatch to make this work and if I'm suppose to copy the files admin & includes into the admin file or into the directory
I am totally lost with this I thought it was straight forward but I guess not for me
Thank you
No problem. In your admin panel navigate to Tools > Install SQL Patches. Copy and paste the patch into the text box then click on "Send" This will update your DB. Please remember that when your updating your site and DB it's good practice to make back ups of both. Especially your DB.
My bad... sorry I forgot something very basic. To work with this code you need to declare $db a global var within your function do this by adding $db to the end of the list of var declared global or adding
as the first line of your function. Or you might need to changePHP Code:
global $db
This will also depend on how the classes and functions are set up if you don't understand Object oriented programming trial and error should suffice as these are the only two options. :)PHP Code:
$db -> Execute(
to
$this -> Execute(
Hi! I installed DP 1.3.2 but am getting this message when I view my cart:
Fatal error: Call to undefined function zen_get_products_display_retail_net_price() in /home/unnacoco/public_html/includes/templates/free_red/templates/tpl_product_info_display.php on line 103
(I switch back to the old tpl_product_info_display.php and I'm fine, but of course I don't see the wholesale price.)
Everything else works - I can add the wholesale price(s), set user access levels, my test of a wholesale price shows up in the product listing in admin, everything but the display in the cart.
I am running ZC 1.3.7 - and I see now that this version of DP is for 1.3.8. Is this the problem? If so, must I (groan) reinstall the whole thing or can I just replace or modify one or two files to get it working?
Many thanks!
Adam
Here Dual Pricing and i am having the following errors
Here my websiteCode:products_id']) ) { if ($val > 0) { $adjust_max = false; $prodId = $key; $qty = $val; $add_max = zen_get_products_quantity_order_max($prodId); $cart_qty = $this->in_cart_mixed($prodId); // $new_qty = $qty; //echo 'I SEE actionMultipleAddProduct: ' . $prodId . '
'; $new_qty = $this->adjust_quantity($qty, $prodId, 'shopping_cart'); if (($add_max == 1 and $cart_qty == 1)) { // do not add $adjust_max= 'true'; } else { // adjust quantity if needed if (($new_qty + $cart_qty > $add_max) and $add_max != 0) { $adjust_max= 'true'; $new_qty = $add_max - $cart_qty; } $this->add_cart($prodId, $this->get_quantity($prodId)+($new_qty)); } if ($adjust_max == 'true') { // $messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . ' C: - ' . zen_get_products_name($prodId), 'caution'); $messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . zen_get_products_name($prodId), 'caution'); } } } // display message if all is good and not on shopping_cart page if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART) { $messageStack->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCTS, 'success'); } zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } } /** * Method to handle cart Action - notify * * @param string forward destination * @param url parameters */ function actionNotify($goto, $parameters) { global $db; if ($_SESSION['customer_id']) { if (isset($_GET['products_id'])) { $notify = $_GET['products_id']; } elseif (isset($_GET['notify'])) { $notify = $_GET['notify']; } elseif (isset($_POST['notify'])) { $notify = $_POST['notify']; } else { zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page')))); } if (!is_array($notify)) $notify = array($notify); for ($i=0, $n=sizeof($notify); $i<$n; $i++) { $check_query = "select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $notify[$i] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $check = $db->Execute($check_query); if ($check->fields['count'] < 1) { $sql = "insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . $notify[$i] . "', '" . $_SESSION['customer_id'] . "', now())"; $db->Execute($sql); } } // zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'notify', 'main_page')))); zen_redirect(zen_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, zen_get_all_get_params(array('action', 'notify', 'main_page')))); } else { $_SESSION['navigation']->set_snapshot(); zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); } } /** * Method to handle cart Action - notify remove * * @param string forward destination * @param url parameters */ function actionNotifyRemove($goto, $parameters) { global $db; if ($_SESSION['customer_id'] && isset($_GET['products_id'])) { $check_query = "select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $check = $db->Execute($check_query); if ($check->fields['count'] > 0) { $sql = "delete from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . $_GET['products_id'] . "' and customers_id = '" . $_SESSION['customer_id'] . "'"; $db->Execute($sql); } zen_redirect(zen_href_link($_GET['main_page'], zen_get_all_get_params(array('action', 'main_page')))); } else { $_SESSION['navigation']->set_snapshot(); zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL')); } } /** * Method to handle cart Action - Customer Order * * @param string forward destination * @param url parameters */ function actionCustomerOrder($goto, $parameters) { global $zco_page; global $messageStack; if ($_SESSION['customer_id'] && isset($_GET['pid'])) { if (zen_has_product_attributes($_GET['pid'])) { zen_redirect(zen_href_link(zen_get_info_page($_GET['pid']), 'products_id=' . $_GET['pid'])); } else { $this->add_cart($_GET['pid'], $this->get_quantity($_GET['pid'])+1); } } // display message if all is good and not on shopping_cart page if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART) { $messageStack->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCT, 'success'); } zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } /** * Method to handle cart Action - remove product * * @param string forward destination * @param url parameters */ function actionRemoveProduct($goto, $parameters) { if (isset($_GET['product_id']) && zen_not_null($_GET['product_id'])) $this->remove($_GET['product_id']); zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters))); } /** * Method to handle cart Action - user action * * @param string forward destination * @param url parameters */ function actionCartUserAction($goto, $parameters) { $this->notify('NOTIFY_CART_USER_ACTION'); } // $qty = $this->adjust_quantity($qty, (int)$products_id, 'shopping_cart'); // temporary fixed on messagestack used for check and message needs better separation function adjust_quantity($check_qty, $products, $message=false) { global $messageStack; $old_quantity = $check_qty; if (QUANTITY_DECIMALS != 0) { // $new_qty = round($new_qty, QUANTITY_DECIMALS); $fix_qty = $check_qty; switch (true) { case (!strstr($fix_qty, '.')): $new_qty = $fix_qty; // $messageStack->add_session('shopping_cart', ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ' - ' . $old_quantity . ' => ' . $new_qty, 'caution'); break; default: $new_qty = preg_replace('/[0]+$/','', $check_qty); // $messageStack->add_session('shopping_cart', 'A: ' . ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ' - ' . $old_quantity . ' => ' . $new_qty, 'caution'); break; } } else { if ($check_qty != round($check_qty, QUANTITY_DECIMALS)) { $new_qty = round($check_qty, QUANTITY_DECIMALS); $messageStack->add_session('shopping_cart', ERROR_QUANTITY_ADJUSTED . zen_get_products_name($products) . ERROR_QUANTITY_CHANGED_FROM . $old_quantity . ERROR_QUANTITY_CHANGED_TO . $new_qty, 'caution'); } else { $new_qty = $check_qty; } } return $new_qty; } } ?>
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/wealthuk/public_html/includes/classes/shopping_cart.php:1903) in /home/wealthuk/public_html/includes/functions/sessions.php on line 108
Warning: Cannot modify header information - headers already sent by (output started at /home/wealthuk/public_html/includes/classes/shopping_cart.php:1903) in /home/wealthuk/public_html/admin/includes/init_includes/init_templates.php on line 32
http://www.joanne-warrick.com
Following up on my question above (and still hopefully looking forward to an answer!)... I am wondering something:
If I'm running ZenCart 1.3.7, should I install a previous version of Dual Pricing? If so, which one? And would I be missing out on important bug fixes if I do that?
Thanks,
Adam
I found this answer helpful many times. Hope it works for you.
https://www.zen-cart.com/tutorials/index.php?article=87
Problem solved - it was as simple as installing the correct version of Dual Pricing - for ZC 1.3.7!
Truly, it pays to read everything, and to install the appropriate plugin for one's version of ZC.
Thanks!
adam
So i read through this whole thread and it kinda looks like dual pricing will work for me, but can you clarify that it will do what I need?......
here goes
We sell dvds in this store. We are selling to wholesalers and distributors on this site. Another cart is not an option, unfortunatly the company owner wants it only on one.
I need wholesale pricing to be 12.00 for new products and 10.00 for older titles.
I need distributor pricing to be 15.00 for new products and 13.00 for older titles.
The products are the same for both cust types.
If dual pricing will work cool. if not, any idea what I should i use?
Thanks for any help here,
jim
Hi Jim,
Dual Pricing would work like this.....
No Country For Old Men
Price: 15.00
Wholesale: 12.00-0.00-0.00-0.00
The Breakfast Club
Price 13.00
Wholesale: 10.00-0.00-0.00-0.00
Then you would assign a "1" to all of the wholesale customers for their pricing level in Admin>Customers. When they are logged in.... their wholesale price will magically appear. Yay!
Since Dual pricing uses up to four pricing levels, I put 0.00 into the other spaces. This probably doesn't have to be done, but I've always done it this way and never had any problems (and never tried it without the zeros).
So yes, Dual Pricing should work for you. You can also use the Quick Updates mod, enable it to work with Dual Pricing, and you can update all of your prices much faster.
nice! thanks that what i needed to know!!:clap::clap:
craft,
It works like a charm thanks again!!
jim
Hi Great mod, just 2 questions:
(1) How would I show both prices for both logged in and not logged in?
(2) How do you get it to show the retail price as taxed and the wholesale as not taxed?
I am setting up an Australian shop where we have to show GST prices - This script would work great where I can use "retail" as "GST" and "wholesale" as "No GST".
But I need to be able to display both all the time - either logged in or not.
Thanks for your help.
Just walk through every file and anytime you see a note mentioning the code has been changed for dual pricing then remove these "if" statements;
PHP Code:
if ($_SESSION['customer_id'])
Also get rid of any functions that may be executed just to gather data for an "if" statement. Some basic PHP skills or trial and error will be needed in order to remove the right code with the corresponding functions.PHP Code:
if ($customer_check->fields['customers_whole'] != "0")
For example...
Above (taken from tpl_product_info_display.php, line 67-75) will now look like this...PHP Code:
//***********************************************************************
//***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
//***********************************************************************
Next you can just edit the tpl_product_info_display.php file in order to change the wording to suit your needs.PHP 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 /> ';
//***********************************************************************
//***END DISPLAY NET RETAIL PRICE IF WHOLESALE CUSTOMER IS LOGGED ON
//***********************************************************************
Sorry if this has been answered before. I read most of the posts and also did a search but cannot find a post related to my problem.
I am using dual pricing but on entering multiple prices on the product information screen (as per the example 50.00-30.00-0.00-25.00) only the first price is actually stored. When entering the product page again the wholesale field contains only 50.00
Any ideas?
Zencart 1.3.8a with dual pricing version 1.3.2
I've just downloaded this mod and I had a question that I don't think has been asked yet, or maybe I missed it in my searching. In that case, I apologize.
The ReadMe.txt states "Making these changes WILL make upgrading your store to new versions harder."
I've been working with Zen Cart for 2 years now and, although I love it and am grateful, I sure don't want to add any trouble. Question is: Can I install this mod taking advantage of the override system as with customization files?
For example:
File 'admin/attributes_controller.php' appears to be overwritten upon install.
Instead of overwriting, can I place the new file in 'admin/CUSTOM/attributes_controller.php' ?
Thank you for any insight into this question.
Tamara
i don't think there are overrides for the admin section at all.
i've installed a whole lot of mods and custom code throughout my site, and i'm not looking forward to future upgrades, but with a decent folder/file comparison app you can at least go back and find everything you changed in the previous version. just a thought.
Thanks, I now remember reading about that. Appreciate the response!
Tamara
Tamara, All modifications you make to the base Zen-Cart code will make upgrading harder as when you uprade you can't really just overwrite the old versions files with the new ones as you have customized the file. SlowAwake, is right. The best thing to do when upgrading and when adding more than one module that affect the same file is to use file comparing software. I recomend WinMerge which is free and easy to use.
I would just use the file comparison software. I agreed with SlowAwake but just did a little test and it seems like there might be overrides for the admin section. I would say go ahead if you want.
Cheers,
I suppose it couldn't hurt to try. I have solid backups of my site and database. I guess the worst that could happen is Zen Cart slaps me with a big :censored:. I'll do some more research on the admin/override issue and then give it a go. Who knows, maybe I'll get lucky.
I've installed the Version: 1.3.2 on Zen Cart™ Version: v1.3.8. For the wholesale price I put 12.99-10.99-0-7.99, then assigned my account to level 4, but when I go to the site and log-in still I see the regular price which is 14.99, even though I am suppose to see 7.99. what is it that I am doing wrong?
Just a side note, is there anything else I have to do from the admin section besides putting the wholesale price and assigning a wholesale level to the user?
thank you.
Please read this post as it might help you out. Also try using '0.00' instead of '0' I'd be surprised if this is what's breaking, but if it is I'll fix it in a future release.
No there is nothing else you need to do from the admin section. If your problem persists please give a few more details. Such as when you go to catalog > categories/products do you see the whole sale prices along with the retail price?
still not working... when I go to catalog > categories/products I do see the wholesale prices with the retail.
On thing I don't get is that what it said on the readme.txt file,
"you can see that you will have 4 levels of wholesale price available the 3rd level is 0 so customers set to level 3 will get the level 1 price.
In the attributes, you need to use comma separation eg
50.00,30.00,0.00,25,00
Attributes can be set in the same way."
What does this means?
Thank You.
It means that if you set one of the WS values to 0, instead of giving away your product the price will default back to level one.
This means that the prices are being entered correctly into your database. It's just not displaying correctly. Did you upload the includes/templates/YOUR TEMPLATE/tpl-product_display.php into the proper folder? Meaning did you change the "YOUR TEMPLATE" into the current template you are using.
I received this via PM and thought I would share the solution just in case.
note out lines 139, 143 of includes/functions/functions_prices.php. They are identical and look like the following.Quote:
Originally Posted by trudesign
Furthermore note the following lines (70-76) in includes/templates/YOUR TEMPLATE/tpl_product_info_display.phpPHP Code:
$products_price = $product_check->fields['products_price'];
This should work. I haven't tested it. Please let everyone know if it does. It will not ever show the Retail Price but you will need to add some arbitrary number in there. There is a way to show a MSRP or such price in the Retail prices place and only show that to WS customers but it will get a lot more complicated.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'] == "1") {
echo '<span>' . ' 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 /> ';
}
}
Cheers,
This is the thread that the Wholesale pricing mod says to go to for support, so please don't stomp on my fingers!
I own Easy Populate Pro, which is installed in a version of Zencart 1.38a. I just installed the wholesale pricing mod, and now Easy Populate is "burping". I get the following error when I tryt o open it in Admin:
Fatal error: Call to a member function on a non-object in /home/dbgoldsm/public_html/store/admin/includes/functions/extra_functions/easypopulate_functions.php on line 594
Any help for this clueless php ignorant soul appreciated!
thank you,
betty
Betty,
Sorry no finger stomping here! This sounds like it could be a little bit more complicated of a problem... What version of ZC are you running? What version of PHP (you might not know this)? Have you made any other changes? What files were changed that both mods effect? Can you post the code in the file that the error is referring to? Maybe a few lines before and after also.
Thanks,
Hi.
I have installed this mod, but have 2 questions.
1. I only sell CD's and set the product type as Music, but when editing a product there is no where to enter the wholesale prices (although it is working in the General product type). Will this work with Music product types or will I have to set my products to General?
2. I use zones to set the postage rates, is it possible to have different postage rates for the wholesalers?
Many thanks
Zencart is version 1.38a, Php is version 4.4.8
Here are lines 576-616 of the file:
I'm actually thinking of removing easy populate since this particular store doesn't need it. It's just a part of the install package I use. Problem is I don't know how to remove it from the db, unless it's just a matter of getting rid of some tables.Code:function ep_chmod_check($tempdir)
{
global $epMsgStack, $config_fail;
if (!file_exists($tempdir . ".") || !ep_is_writable($tempdir))
{
@chmod($tempdir, 0700);
if (!ep_is_writable($tempdir))
{
@chmod($tempdir, 0777);
if (!ep_is_writable($tempdir))
{
if (strstr(php_uname(), 'Windows'))
{
$epMsgStack->add(EASYPOPULATE_MSGSTACK_TEMP_FOLDER_MISSING, 'warning');
$config_fail[] = 'EASYPOPULATE_FAIL_CONFIG_TEMPDIR_MISSING_WIN';
}
else
{
$epMsgStack->add(EASYPOPULATE_MSGSTACK_TEMP_FOLDER_MISSING, 'warning');
$config_fail[] = 'EASYPOPULATE_FAIL_CONFIG_TEMPDIR_MISSING';
}
$chmod_check = false;
}
else
{
$epMsgStack->add(EASYPOPULATE_MSGSTACK_TEMP_FOLDER_PERMISSIONS_SUCCESS, 'success');
$chmod_check = true;
}
}
else
{
$epMsgStack->add(EASYPOPULATE_MSGSTACK_TEMP_FOLDER_PERMISSIONS_SUCCESS, 'success');
$chmod_check = true;
}
}
else
{
$chmod_check = true;
}
return $chmod_check;
}
I do have other mods installed as well that I got an error message from, one being fckeditor v2.5. So I turned it off. I have image handler, quick updates, google base, google sitemaps, google analytics, ty package tracker, recently viewed, and I can't remember right now if there are any more.
thank you,
betty
Betty,
Sorry it looks like I can't really help you on this forum. I would try a google search of "Call to a member function on a non-object in site:zen-cart.com" to see some of the other threads involving this problem. I know that 1.3.8 was optimized for php 5.2. I don't know if your problems could be stemming from this. Overall though I haven't seen this happen before. I'm running this mod with most all of the packages you listed with no complications. So I'm guessing the problem lies elsewhere. Again sorry. Further more judging by the line that is giving the error it looks like easy populate is trying to tell you that your temp directory is missing...
The mod does only work with General... sounds like it would be easy to switch everything over. You could even use a SQL command to do it all at once if you're familiar with that.
I'm sure you can get Zencart to do this. I'm not familiar enough with the back end working of zones to guide you through it without doing the work myself but using the code that tells ZenCart to do something if a customer is whole sale you can pretty much do anything with some PHP knowledge.
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->
Thank you for the quick reply. I really would love to keep the products as Music for the Artist, Record Company, and Genre links, but I guess it will have to be General if I want the wholesale prices. :(
I don't know any PHP (must have been off that day :blush:) so this could be an uphill struggle, time to do some research. What file is the above code from?
Thanks
I didn't originally design this so I don't know why he made it only for general products. I can look into this and try and do it for the other categories. You will have to give me a bit of time on this though if you want to wait for it...
It can be found in pretty much any of the front end files. Good luck
I tried it but its all the same... Thanks man for ur help but I guess this is really complicated and writing a script for this problem is a really big goal. I dont know why but english version runs quite well but slovak version show only prices and no description and head titles... Please if you know why its not working, tell me how can I transport database from oscommerce shop to zencart shop.
Thanks
embepo
embepo... sorry but I think you meant to post this on "OsCommerce Data Importer - Errors"
Chrome Orange,
I was just hired to take over this site and finish for a client. Last developer skipped town. Never used Zen cart before so excuse me if some questions are obvious. Tried to read up a lot on this forum first, but might have missed some answers.
1. Client has version 1.2.6 - do I need to upgrade to newest version to use your mod?
2. Client does wholesale and retail. Does this mod allow secure login for wholesalers to see wholesale prices?
3. Client has $250.00 min. for first time wholesale orders. A $150.00 reorder min. For the $150.00 reorder min. they have a $10.00 service fee if the min. is not met. Does your mod support such rules?
That's all I can think of now, but sure I will have more later!
Thanks for your help.
Hey there, I'm not sure if Chrome Orange still posts here, so excuse me for butting in....
1. Do your client a favor and upgrade to the newest version of Zen Cart and use the newest version of this mod.
2. Yes, there is a secure login and they will see wholesale prices (after you have made the necessary switch in their customer details).
3. This mod doesn't support those kinds of rules, although I believe there are other mods out there for minimum orders and service fees. Those would also affect your retail customers though, so you'd have to tweak the code in those mods to recognize when a wholesale customer is logged in. How I get around it is... I have a wholesale info page where I state the minimums and other info. I explain how the cart will allow checkout for less than the minimum and that any wholesale order not meeting my minimum requirements may be subject to cancellation. I have also added "minimum wholesale order $150" to the shopping cart and checkout pages with a link to the wholesale info page. This has worked well for me, but may not for your client, I don't know.
:smile:
OK...hope im not messed up here... I dl'd the mod and made sure (twice) that all files were in place. I ran admin and when it comes up it gives me this...
1054 Unknown column 'p.products_price_w' in 'field list'
in:
[select p.products_type, p.products_id, pd.products_name, p.products_quantity, p.products_image, p.products_price, p.products_price_w, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_model, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_quantity_order_max, p.products_sort_order from zen_products p, zen_products_description pd, zen_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = '1' and p.products_id = p2c.products_id and p2c.categories_id = '36' order by p.products_sort_order, pd.products_name limit 0, 500]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
This is in between the dropdowns and the catagory fields. It says to run an sql patch that is provided. How do I do this? I know...Im new...please help...thanx
Thank you craft zombie. I was thinking the same about the minimums. Just state it on the site in appropriate places and such. Good suggestions.
The download area...
http://www.zen-cart.com/index.php?ma...roducts_id=166
Thanks, I found it last night.
I got 2 errors in product_music/collect_info.php at lines 22 and 380 where you had left in your virtual paths, and I also got the same error in product_music/update_product.php on line 37 but, after deleting the paths, it all seems to be working.
Thanks very much for your work, I really appreciate it. :bigups:
I seem to be having 2 more issues with ther wholesale version of the mod.
1. Regardless of what set the store to in the "My Store" section, it remains in Showcase mode and nothing can be ordered.
2. In category and products screen, my "red dots" and the legend is duplicated, I have 2 sets of them showing in admin.
thank you,
betty
I don't know how Dual Pricing could be effecting this. Sorry Betty I think your problem might lie outside of this mod or I don't quite understand the issue.
I see this. I fixed it for a future version but it seems a little bit to small of a problem to post a new version for as it is cosmetic, and it's in the Admin side of things.
In the mean time if you'd like to remove it, delete lines 21-30 in admin/includes/modules/category_product_listing.php
Cheers,
You were absolutely correct on item 1, it was a setting in the customers settings. My apologies for thinking it had to do with the mod.
Thank you for the fix for the other issue. My client was just asking about it that's all.
betty
I am having difficulty with wholesale price not showing on order. It shows the qty., product name, correct delivery rate, priority handling, calculates GST & PST on those two items (shows in Total) BUT the Sub-Total is $0.00.
I have a minimum order which takes into calculation and would not let me check-out with a lesser amount, (so I know the amount is there somewhere);
When I add items, it shows Unit $0.00 Total $0.00 BUT Sub-Total shows correct amount. When I click on checkout, the Sub-Total is $0.00.
Where should I look??
Thanks
Veronika
Hi there,
We've had the dual pricing module installed on a client site for a while and it's been working fine. Now the client wants to be able to set minimum quantities for products (which they didn't earlier), but crucially, they only want these minimums to apply to wholesale clients, retailers should be able to buy any amount. The quantities vary between products.
I've done a lot of searching in the forums and with Google, but can't seem to find any relevant information, so would be really grateful if someone has any thoughts on this!
Thanks, karl
Karl,
With out looking at how complicated this would be there is always possibility to change any functionality in ZC to only apply to WS customers. Please look back at some previous posts where I have mentioned the bit of code to use...
In your case just take the Minimum quantity function all ready built in and wrap the code around it on the front end so that it only applies to WS customers. I've done some great little customizations to ZC for dual pricing this way already.
Madfastride,
Thanks for the reply! Yep, in the end we figured out where the minimum quantity function was called and did a check for whether the customer logged in was a wholasaler or not. Things seem to be working fine now. We've also managaed to do a number of little checks and variations in content based on this WS-switch - good fun.
hi madfastride,
i upgrade from 1.3.2 to 1.4.2 to your script.
when i do diff to compare your dual pricing mod.
i wonder why you don't use the most update 1.3.8a to modify the code rather than using your current one?
as i know that the new 1..3.8a in some files, such as function_price and class/shopping_cart.php has do some bugs fix.
looking for your updated file to download.
What could I have done wrong? I just installed the wholesale mod in another store and everythign is working except:
1. The number field is not showing up under the customer emailer address giving them permissions
2. In the store, only the retail price will show up
Everything else works flawlessly. What did I screw up this time around?
thank you,
betty
Once again I found my own error.
Now for a valid question. How do I get rid of the "Retail Prices:"part of "Retail Prices:Log-In for Prices?
thank you,
betty
Betty,
Where are you seeing "Retail Prices:Log-In for Prices?" I don't know where this is... Also I tried to put detailed directions to changing wording in the Read Me file along with CSS IDs to change for styling effects on the <span> tags. Please view this... Hope this helps
I'm working on some new functionality to the dual Pricing mod. I'm working on having some options in the admin section to improve usability. one idea is to have all products that are not WS filtered out for WS customers as to minimize searching and confusion for your WS customers. I'm going to post three functions to my web site that are part of this... I have these running on another site so they work. I will be taking feedback, trouble shooting, and comments via PM... Nothing on the posts yet as to cut down on confusion. Remember the file contains three different functions, so make sure to cut and paste them into the right places...
http://www.pushingbuttonsaz.com/3modifiedfunctions.zip
Hopefully this will be part of a big 3.0 release of this mod...
Cheers,
OK, people can call me stupid but this line in the readme file
where do i place the wholesale price?Quote:
To set the wholesale price go to the product and change the wholesale price to be a dash separated list eg.
50.00-30.00-0.00-25.00
admin > catalog > Categories / Products > then i select a product???? but there is no wholesale price box only "Products Price" Net & Gross, somebodt please point out the obvious to me.
Hi danpoole,
If you've installed the module correctly, there should be a new box under the gross price, so that you have:
Tax Class
Products Price (Net)
Products Price (Gross)
Wholesale Price (Net)
If you haven't got that, you've most likely missed something in the installation process, might be worth having a look through it again.
Good luck!
So I've installed this mod and it's largely working. The only issue I've found is that when I try and update the Wholesale price, it doesn't save. I don't get an error, but the database isn't updated.
If I put the wholesale price in using SQL, everything displays fine.
Any ideas?
I had the same problem, I uploaded the files using Ipswitch WS_FTP Professionsl using both Binary then Auto mode. In the end i was so frustrated at it not working that I individually uploaded every file through Dreamweaver, then it all worked.
So it was fixed but i'm sorry to say i have no idea how.
Hi all
I have seen this question asked but I can find no answer.
I am using ZC 1.3.8a, PHP 5.2.5 EP Advanced 3.0.3 and Dual Pricing 1.4.2
Everything appears to be working OK. I can see the retail price change to wholesale when I log in as an approved customer. I have set Product Priced by Attributes in Admin / Catalog / Cats- Products.
I can not find out if it is possible to add wholesale prices with Easy Populate and how.
I have added a wholesale price manually but I can not see this price in any file downloaded with EP.
Can anyone help - Thanks Steve
Have you run the sql patch? This module requires a mod to the database. I can't imagine that's the problem since the pages wouldn't work at all without that.
I didn't have any trouble with this mod.
As an update, I installed a "customized" version of the tax exempt module so now my WS customers aren't charged tax. I think that is a critical piece missing from this otherwise great mod.
Hi! Actually, it was the Quick Updates mod, not Easy Populate. I recommend the Quick Updates mod to ALL Zencart users. It is an extremely valuable tool because it will save you tons of time when you need to update many products at once. I don't know much about Easy Populate and have never used it because frankly, I don't know how to create tab delimited files. I'm sure its not that hard, I just don't have the time to find out for sure! It sounds like Easy Populate might be even faster than Quick Updates since you just need to upload one file, but Quick Updates is really easy to use for us non-Excel people. And since Quick Updates is definitely compatible with Dual Pricing, it might be the right choice for you right now until you can get more info on whether Easy Populate will work. If you decide to use Quick Updates, see this link for easy instructions on how to enable it to work with Dual Pricing:
http://www.zen-cart.com/forum/showpo...&postcount=194
:smile:
Here is a screen shot of what Quick Updates looks like after you adjust it to work with Dual Pricing:
http://craftzombie.com/zencart/qu.gif
The section in red should appear and you will be able to add the four different pricing levels. Much thanks to PaulM for adding this to Quick Updates after I and a few others requested it. It saved me!
I have installed Dual Pricing 1.3.8 on my 1.3.6 zencart install. Everything seems fine except one thing - all my prices in the store are displaying as 0! Is this because of the slight version difference? Or is there another problem. I tried to read through this thread to find a solution but my eyes went buggy after so many pages!
Thanks in advance!
k23m,
I would try installing the version of the mod that was intended for your Cart Version. I don't know what functionality if any you will lose by choosing not to upgrade.
Dual Pricing for ZC Version 1.3.6
from what i can tell wholesale prices dont get affected by specials ?? has there been any work on this as im going to have a look at working some thing out...
thanks all the same for the mod...
Hayden.
btw on the topic of specials, heres an importan easy fix to make the selection box for picking your product to be on special:
line: 316
/admin/specials.php
the only change in the below is on line 316; > size="30" (instead of 5 !! :wacko:
PHP Code:
<tr><form name="new_special" <?php echo 'action="' . zen_href_link(FILENAME_SPECIALS, zen_get_all_get_params(array('action', 'info', 'sID')) . 'action=' . $form_action . '&go_back=' . $_GET['go_back'], 'NONSSL') . '"'; ?> method="post"><?php if ($form_action == 'update') echo zen_draw_hidden_field('specials_id', $_GET['sID']); ?>
<td><br><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><?php echo TEXT_SPECIALS_PRODUCT; ?> </td>
<td class="main"><?php echo (isset($sInfo->products_name)) ? $sInfo->products_name . ' <small>(' . $currencies->format($sInfo->products_price) . ')</small>' : zen_draw_products_pull_down('products_id', 'size="30" style="font-size:10px"', $specials_array, true, $_GET['add_products_id'], true); echo zen_draw_hidden_field('products_price', (isset($sInfo->products_price) ? $sInfo->products_price : '')); ?></td>
</tr>
<tr>