[Contrib] Quick Price Updates for SPPC
#1
Posted 27 November 2005, 16:38
This version is based on the Quick Price Updates version 2.6 of Februari 2005. The "only" additional feature is that you can choose a customer group and then the prices for that customer group will be shown and can then be changed. So you can only change prices for products for one particular customer group, not all at once (I don't think it is even possible). Maybe not ideal, but it might be helpful.
The newer versions of Quick Price Updates all seem to cater to people with particular contributions installed, so I opted to use the latest one that was still kind of generic.
The features that were already in, like selecting according to category and manufacturer (or both), sorting (sorting on price will be according to retail price) and editing of model, product status, title, tax etcetera are still in.
It appears to work OK, but since this is a new version: be careful and backup your database first before using it.
For the record: the contribution can be found here.
#2
Posted 31 January 2006, 21:52
just wondering, do you think this could be adapted to work for the pricebreaks as well?
#3
Posted 27 August 2006, 16:31
I've just installed Quick Updates for SPPC and I've encountered a strange problem. (I have a small problem with my Admin Access Level Contrib - so I'm not sure if that's affecting that...)
I got it installed with a few minor problems and then when I was using Quick Updates, everytime I selected a value in the pull down menus along the top it would take me back into the Admin Login Page.
If someone could shed some light on this it would be much appreciated.
#4
Posted 27 August 2006, 17:01
Thenes, on Aug 27 2006, 06:31 PM, said:
I got it installed with a few minor problems and then when I was using Quick Updates, everytime I selected a value in the pull down menus along the top it would take me back into the Admin Login Page.
I use for example (local machine in a local network):
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://192.168.0.9'); // eg, http://localhost - should not be empty for productive servers
define('HTTP_CATALOG_SERVER', 'http://192.168.0.9');
define('HTTPS_CATALOG_SERVER', '');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/Library/WebServer/Documents/catalog3/'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/catalog3/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/Library/WebServer/Documents/catalog3/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/catalog3/'); // absolute path required
define('DIR_FS_CATALOG', '/Library/WebServer/Documents/catalog3/'); // absolute path required
This PHP snippet:<!-- SPPC mod: next tr changed for better HTML -->
<tr><td colspan="5" class="smalltext"> </td></tr>
<tr align="center">
<td class="smalltext"><?php echo tep_draw_form('row_by_page', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id);
// BOF Separate Pricing Per Customer
echo tep_draw_hidden_field('customers_group_id', $customers_group_id);
?></td> generates the following html:<!-- SPPC mod: next tr changed for better HTML --> <tr><td colspan="5" class="smalltext"> </td></tr> <tr align="center"> <td class="smalltext"><form name="row_by_page" action="http://192.168.0.9/catalog3/admin/quick_updates.php" method="get"><input type="hidden" name="manufacturer"><input type="hidden" name="cPath" value=""><input type="hidden" name="customers_group_id"></td>
#5
Posted 28 August 2006, 02:40
JanZ, on Aug 28 2006, 03:01 AM, said:
I use for example (local machine in a local network):
// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
define('HTTP_SERVER', 'http://192.168.0.9'); // eg, http://localhost - should not be empty for productive servers
define('HTTP_CATALOG_SERVER', 'http://192.168.0.9');
define('HTTPS_CATALOG_SERVER', '');
define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
define('DIR_FS_DOCUMENT_ROOT', '/Library/WebServer/Documents/catalog3/'); // where the pages are located on the server
define('DIR_WS_ADMIN', '/catalog3/admin/'); // absolute path required
define('DIR_FS_ADMIN', '/Library/WebServer/Documents/catalog3/admin/'); // absolute pate required
define('DIR_WS_CATALOG', '/catalog3/'); // absolute path required
define('DIR_FS_CATALOG', '/Library/WebServer/Documents/catalog3/'); // absolute path required
This PHP snippet:<!-- SPPC mod: next tr changed for better HTML -->
<tr><td colspan="5" class="smalltext"> </td></tr>
<tr align="center">
<td class="smalltext"><?php echo tep_draw_form('row_by_page', FILENAME_QUICK_UPDATES, '', 'get'); echo tep_draw_hidden_field( 'manufacturer', $manufacturer); echo tep_draw_hidden_field( 'cPath', $current_category_id);
// BOF Separate Pricing Per Customer
echo tep_draw_hidden_field('customers_group_id', $customers_group_id);
?></td> generates the following html:<!-- SPPC mod: next tr changed for better HTML --> <tr><td colspan="5" class="smalltext"> </td></tr> <tr align="center"> <td class="smalltext"><form name="row_by_page" action="http://192.168.0.9/catalog3/admin/quick_updates.php" method="get"><input type="hidden" name="manufacturer"><input type="hidden" name="cPath" value=""><input type="hidden" name="customers_group_id"></td>
Hi, thanks for that - that actually fixed another problem I had with File Access in Admin Levels, however I'm still getting bounced out, and I have no idea what it is.
On Quick Updates, I can click the sorting or the arrow to go to the product etc, but still all the pull down menus, and the Update button - all take me to the Admin Login page.
#6
Posted 11 March 2007, 19:00
I have been using SPPC 415 succesfully. I have installed the Quick Price Updates, but when I select any price group from the top right drop down box, I am always immediately returned to the Retail group. I am unable to pull up any other price group.
Any Suggestions?
Thanks in advance.
#7
Posted 11 March 2007, 19:28
Thanks
#8
Posted 15 March 2007, 14:34
I have a lot of products and it takes forever for the page to load going through the catalog/products.
btw, thanks janz for the help with the code to update all of the products through sql.
Mike
#9
Posted 15 March 2007, 21:40
paq1200, on Mar 15 2007, 03:34 PM, said:
I have a lot of products and it takes forever for the page to load going through the catalog/products.
Perhaps it has been done already however. You could check the regular quick updates contribution if anybody has added that as a mod, or perhaps there is a thread for that contribution in which it has been mentioned.
#10
Posted 01 May 2007, 08:25
a member of the German Forum has changed the Quick Updates Contrib to use it with Gross Prices( tax included) today.
He made only a few changes but I am not able to transfer them to the Quick Updates with SPPC Contrib. The coder himself doesn´t use SPPC.
Could you please watch this out if you have some time??
Here is the thread from the German Forum. If you read from the bottom upwards you will find the post quickly
http://forums.oscommerce.de/index.php?showtopic=52582
Thanks,
Carsten
Edited by Hondo, 01 May 2007, 08:26.
#11
Posted 01 May 2007, 18:38
Hondo, on May 1 2007, 10:25 AM, said:
He made only a few changes but I am not able to transfer them to the Quick Updates with SPPC Contrib. The coder himself doesn´t use SPPC.
#12
Posted 01 May 2007, 21:20
JanZ, on May 1 2007, 08:38 PM, said:
#13
Posted 02 May 2007, 04:52
JanZ, on May 1 2007, 11:20 PM, said:
Hi Jan!
Thank you for your efforts!
There is a note of the coder in the german forums regarding this. I will post it like it is in German to avoid of translation missunderstandings. I think you understand German as you mentioned last time. Here it is:
Dann noch die letzte Änderung:
if(DISPLAY_TAX == 'true'){if(MODIFY_TAX == 'true')echo "<td class=\"smallText\" align=\"left\">".tep_draw_pull_down_menu("product_new_tax[".$products['products_id']."]", $tax_class_array, $products['products_tax_class_id'])."</td>\n";else echo "<td class=\"smallText\" align=\"left\">" . $tax_rate['tax_class_title'] . "</td>";}else{ echo "<td class=\"smallText\" align=\"center\"></td>";}
Hier sollte allerdings noch beim Ändern der Tax zuerst die updateNet und dann die updateGross aufgerufen werden. Weiss aber auf die Schnelle nicht wie und hab jetzt die Schnauze voll... Irgendwie mit onchange. wink.gif
#14
Posted 02 May 2007, 05:04
Hondo, on May 2 2007, 06:52 AM, said:
Thank you for your efforts!
There is a note of the coder in the german forums regarding this. I will post it like it is in German to avoid of translation missunderstandings. I think you understand German as you mentioned last time. Here it is:
Dann noch die letzte Änderung:
if(DISPLAY_TAX == 'true'){if(MODIFY_TAX == 'true')echo "<td class=\"smallText\" align=\"left\">".tep_draw_pull_down_menu("product_new_tax[".$products['products_id']."]", $tax_class_array, $products['products_tax_class_id'])."</td>\n";else echo "<td class=\"smallText\" align=\"left\">" . $tax_rate['tax_class_title'] . "</td>";}else{ echo "<td class=\"smallText\" align=\"center\"></td>";}
Hier sollte allerdings noch beim Ändern der Tax zuerst die updateNet und dann die updateGross aufgerufen werden. Weiss aber auf die Schnelle nicht wie und hab jetzt die Schnauze voll... Irgendwie mit onchange. wink.gif
Not able to edit my last post
Translation of the last bold sentence should be like this:
When changing the tax at this position updateNet and updateGross should be accessed first of all. But I´m not sure how to do this for the moment. Perhaps in some way with onchange.
#15
Posted 02 May 2007, 22:28
Hondo, on May 2 2007, 07:04 AM, said:
Anyway, these are the total changes (apart from adding the JavaScript code, that part is the same). This starts around line 584 in the original file quick_updates.php (the SPPC version of course):
//// get the specials products list
/* deleted code */
//// check specials
// original: if ( in_array($products[$x]['products_id'],$specials_array)) {
if (tep_not_null($products[$x]['specials_id'])) {
/* deleted code */
echo "<td class=\"smallText\" align=\"left\">Â Â Â Â <input type=\"text\" size=\"8\" name=\"product_new_price[".$products[$x]['products_id']."]\" value=\"".$products[$x]['products_price']."\" disabled >Â <a target=blank href=\"".tep_href_link (FILENAME_SPECIALS, 'sID='.$products[$x]['specials_id']).'&action=edit'."\">". tep_image(DIR_WS_IMAGES . 'icon_info.gif', TEXT_SPECIALS_PRODUCTS) ."</a></td>\n";
} else {
if ($flag_spec == 'true') {
echo "<td class=\"smallText\" align=\"left\">Â Â Â Â <input type=\"text\" size=\"8\" name=\"product_new_price[".$products[$x]['products_id']."]\" "; if(DISPLAY_TVA_UP == 'true'){ echo "onKeyUp=\"display_ttc('keyup', this.value" . ", " . $tax_rate['tax_rate'] . ", 1);\"";} echo " value=\"".$price ."\">". tep_draw_checkbox_field('update_price['. $products[$x]['products_id'] .']','yes','checked','no')."</td>\n";
} else {
echo "<td class=\"smallText\" align=\"left\">Â Â Â Â <input type=\"text\" size=\"6\" name=\"product_new_price_gross[".$products[$x]['products_id']."]\" ";
echo "onkeyup=\"updateNet(".$products[$x]['products_id'].");\"";
echo " value=\"".($price*(1+$tax_rate['tax_rate']/100)) ."\">Â Â <input type=\"text\" size=\"6\" name=\"product_new_price[".$products[$x]['products_id']."]\" ";
echo "onkeyup=\"updateGross(".$products[$x]['products_id'].");\"";
echo " value=\"".$price ."\" style=\"background-color: lightyellow;\">".tep_draw_hidden_field('update_price['.$products[$x]['products_id'].']','yes'). "</td>\n";}
} // end if-else (tep_not_null($products[$x]['specials_id']))
if (DISPLAY_TAX == 'true') {
if (MODIFY_TAX == 'true') {
echo "<td class=\"smallText\" align=\"left\">". tep_draw_pull_down_menu("product_new_tax[". $products[$x]['products_id'] ."]", $tax_class_array, $products[$x]['products_tax_class_id'], 'onchange="updateGross('.$products[$x]['products_id'].')"')."</td>\n";
} else {
echo "<td class=\"smallText\" align=\"left\">" . $tax_rate['tax_class_title'] . "<input type=\"hidden\" name=\"product_new_tax[". $products[$x]['products_id'] ."]\" value=\"" . $products[$x]['products_tax_class_id'] . "\"></td>";
} // end if-else (MODIFY_TAX == 'true')
} else {
echo "<td class=\"smallText\" align=\"center\"><input type=\"hidden\" name=\"product_new_tax[". $products[$x]['products_id'] ."]\" value=\"" . $products[$x]['products_tax_class_id'] . "\"></td>";
}
//// links to preview or full edit Added a light yellow background to the net price column. Found it a bit confusing without. It changes the gross price when you change the tax in the drop-down menu. The JavaScript updating works also when DISPLAY_TAX or MODIFY_TAX are false.
#16
Posted 07 May 2007, 19:17
JanZ, on May 3 2007, 12:28 AM, said:
Thank you very much, Jan! The code works perfect and changing prices will be much easier for me in the future.
I don´t want to be brazen but will ask for it nevertheless:
The ultimate thing would be to change also the special prices with gross and net using Quick Updates. Beeing back to the use of a wide screen...
Perhaps you´ll find a minute for that
Cheers, Hondo
#17
Posted 07 May 2007, 21:08
Hondo, on May 7 2007, 09:17 PM, said:
#18
Posted 09 May 2007, 17:34
JanZ, on May 7 2007, 11:08 PM, said:
Hi Jan,
the contribution is generally great to update specials. Thank you very much!
But for my retail store it would be very helpful to type in the gross price directly in the same way you did it for Quick Updates.
Could you please include this when you find some time??
Thanks,
Carsten














