Zen Cart Logo
Forums / Addon Admin Tools / Quick Updates plugin [support]

Quick Updates plugin [support]

Views: 180,415

Results 61 to 80 of 670
11 Oct 2006, 11:32 AM
#61
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Quick Updates plugin [support]

Two points; > first is that it still says it is version 1.3Yeah I noticed that just after uploading..... :blush:

How would I (or could someone) add the "sort order" to the list of columns?Hmmm.... might be nice, but not something I will add soon. It reminds me though that I wanted the ability to change the default sort order for the products (or remember the last selected sort order, which should be quite easy I think, I forgot to add it with the last update). My default would be descending on products_id then, showing the latest added products at the top.

edit:
Just to get this clear: I understand you want to sort the columns (while my above rambling is about the sort order of the products themselves).

11 Oct 2006, 12:19 PM
#62
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

To set the default products sort order to descending on products_id (= new products on top) change:

//// control string sort page
	if ($sort_by && !ereg('order by', $sort_by)) $sort_by = 'order by ' . $sort_by ;

To:

//// control string sort page
	if ($sort_by && !ereg('order by', $sort_by)){
  	 $sort_by = 'order by ' . $sort_by ;
	 }else{
  	  $sort_by = 'order by ' . 'products_id DESC' ;	 
	 }

(Sorting the columns would involve a lot more changes BTW)

11 Oct 2006, 12:44 PM
#63
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

:shocking: :blink:

:laugh:

Now I get it, and no it's not a current feature. Maybe Andrew will add it, while he is working on the module anyway ;-)

I think it would not be very difficult to add, but I do not know from the top of my head where these sort orders are stored, so it might be more complicated than I think atm.

12 Oct 2006, 8:23 PM
#64
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Quick Updates plugin [support]

kelvyn:

I meant, the sort order of the products themselves.
You want a new column "Sort order". Ok, It is a little patience.

13 Oct 2006, 1:04 AM
#65
a_berezin avatar

a_berezin

Deceased

Join Date:
Aug 2004
Location:
Saint Petersburg, Russia
Posts:
1,782
Plugin Contributions:
5

Re: Quick Updates plugin [support]

v1.3.6 13.10.2006 5:03

  1. Rename files:
    /admin/includes/extra_datafiles/qucik_updates_filenames.php ->
    /admin/includes/extra_datafiles/quick_updates.php
    /admin/includes/languages/english/extra_definitions/quick_update_english.php ->
    /admin/includes/languages/english/extra_definitions/quick_update.php
  2. Add some edit features;
  3. Add sort order column.

Download and test.

13 Oct 2006, 12:37 PM
#66
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

Hi Andrew,

I hope to test your new version soon. My version is currently diverting form the public one, because I need to add specific code to import data form a wholesaler website. Maybe I will try to run two versions to be able to use it like I want and still keep things synchronized with the public version.

I do have an improvement for the margin calculations. Originally the marginUpdate was only done on purchase price, but it appears to be very easy to change it to update on products_price and ex and including tax as well. It's a very small code change but a big improvement in usability thmo.

I also removed the "lock" form the specials myself. I think marking it as special is nice and handy, but disabling the field is not very handy sometimes. Or is it just me? And should we leave it disabled?

13 Oct 2006, 2:07 PM
#67
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

This looks like a really useful mod :smile:

Which is the latest version - Andrew's or Paulm's - or is there a combined version now maybe?

Would it be possible to convert this so it works with register_globals = off?

13 Oct 2006, 2:31 PM
#68
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

Which is the latest version - Andrew's or Paulm's - or is there a combined version now maybe?

Would it be possible to convert this so it works with register_globals = off?

To answer my own questions ... :smile:

  1. Andrew's latest version (v1.3.6 13.10.2006, available from the link in his post above - post #20) incorporates Paulm's v1.5.

  2. It already does work with register_globals = off (I had downloaded an earlier version from the zen downloads section).

Thanks guys - this looks really good :smile:

13 Oct 2006, 2:31 PM
#69
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

Pixxi:

This looks like a really useful mod :smile:

Which is the latest version - Andrew's or Paulm's - or is there a combined version now maybe?As far as I know Andrew took my latest version and is working on that now. (But currently I do not see a later version from him yet, or am I overlooking it?)

Would it be possible to convert this so it works with register_globals = off?It does work with register globals off. Does it not?

13 Oct 2006, 2:34 PM
#70
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

We posted almost at the same time :-D

Pixxi:

. Andrew's latest version (v1.3.6 13.10.2006, available from the link in his post above - post #80)I must be blind, I don't see it :cry:

edit:

post #80? I only see 74 posts until now ?!

13 Oct 2006, 2:42 PM
#71
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

Ah ... I have a special super-advanced browser, so far ahead of itself that it can display posts that haven't been posted yet ... well Ok. - that should have been post #20 (post corrected) :smile:

17 Oct 2006, 8:55 AM
#72
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

:-) thnx

I noticed a bug: the sorting of prices does not work (at the catalog side of the cart) after using quick_updates to edit prices. I guess the fix is easy and we just need to add:

// reset products_price_sorter for searches etc.
          zen_update_products_price_sorter($products_id);

Untested but I assume it will fix the problem.

17 Oct 2006, 5:36 PM
#73
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

Any particular place that needs to be put, Paul?

17 Oct 2006, 6:48 PM
#74
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

Yep Pixxi, I could not say from the top of my head then. But at approx line 88 the price update part should be update to:

			if($_POST['product_new_price']){
				$_POST['product_new_price'] = zen_db_prepare_input($_POST['product_new_price']);
				foreach($_POST['product_new_price'] as $products_id => $new_price) {
					if ($_POST['product_new_price'][$products_id] != $_POST['product_old_price'][$products_id] && $_POST['update_price'][$products_id] == 'yes') {
						$count_update++;
						$item_updated[$products_id] = 'updated';
						$db->Execute("UPDATE " . TABLE_PRODUCTS . " SET products_price='" . zen_db_input($new_price) . "', products_last_modified=now() WHERE products_id=" . (int)$products_id);
						zen_update_products_price_sorter((int)$products_id);						
					}
				}
			}

Colored quote to highlight the actual change:

if($_POST['product_new_price']){
$_POST['product_new_price'] = zen_db_prepare_input($_POST['product_new_price']);
foreach($_POST['product_new_price'] as $products_id => $new_price) {
if ($_POST['product_new_price'][$products_id] != $_POST['product_old_price'][$products_id] && $_POST['update_price'][$products_id] == 'yes') {
$count_update++;
$item_updated[$products_id] = 'updated';
$db->Execute("UPDATE " . TABLE_PRODUCTS . " SET products_price='" . zen_db_input($new_price) . "', products_last_modified=now() WHERE products_id=" . (int)$products_id);
zen_update_products_price_sorter((int)$products_id);
}
}
}

Tested now, and it works as expected :smartass:

I would like to update the quick_updates soon (and then the above fix will be included of course), but time flies.....

(
Note that this only updates the sort order for prices that are updated after the above change. If really needed, it's also possible to update the sort order for all prices without editting quite easily using this line zen_update_products_price_sorter((int)$products->fields['products_id']) in the while (!$products->EOF) loop. (but better remove this one again after all prices are sorted)
)

17 Oct 2006, 11:11 PM
#75
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

New version available:

2006-10-18: Updated by Paul Mathot (user: paulm @ Zen Cart forums)

  1. Improved margin calculation feature (margin is updated by price ex and price inc, as well as by purchase price now).

  2. Added CSS popup for products description (and modified code so that the normal descriptions are hidden when the editor popup feature is enabled).
    (Tmho the descriptions do not need to be visible in that case, and displaying the descriptions clutters the screen)

  3. Moved CSS, and js for tax and margin calculations, to separate files.

  4. Added zen_update_price() function, to fix price sorting

  5. Made products price for products with special price editable (was disabled), and added color to the input fields background as "Special" warning.

  6. Colored "margin" input backgound light gray, to indicate that it's not ment for editting (disabling the field would interfere with updating it).

Note: Tested in Firefox only (but I hope/think it will work fine in IE too).Decided to use the current date as version number this time ;-)

18 Oct 2006, 7:01 PM
#76
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

Thanks Paul - seems to work fine so far. :smile:

Just one thing - are the thumbnails supposed to show (if enabled in config)? - not seeing them.

Two suggestions/wishlist items:

  1. Would it be possible to add a switch for enabling/disabling the display of price without tax? Quite a few people aren't registered for VAT and it would free up space on the screen if that could be disabled.

  2. Would it be possible (big request :smile: ) to have the mod operate from a search query? ie. the user types in a search query for a particular range of products, can then update/change the products, or move them to different categories and save them. This would be an enormous help for people who have a lot of products and is something the admin as a whole would really benefit from when the shop owner is editing/updating products.

18 Oct 2006, 7:23 PM
#77
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

Pixxi:

Thanks Paul - seems to work fine so far. :smile:

Just one thing - are the thumbnails supposed to show (if enabled in config)? - not seeing them.Oops, yes I was afraid a question like that would be asked sooner or later. I corrected something that I assumed was a spelling error or typo, but I did not really think about people that would update..... The older versions had TRUMBNAIL settings, and the newer version use THUMBNAIL setting (so your sql probably still uses THRUMBNAIL and the current PHP expects THUBMNAIL). If you can remove the sql and load the latest sql I think the problem will be solved. Or edit the settings, using phpMyAdmin for example, and change all TRUMBNAILS to THUMBNAILS in your database.

(I have considered writing some sql to remove all settings, and that would make it easier, but I did not get to it yet. )

Pixxi:

  1. Would it be possible to add a switch for enabling/disabling the display of price without tax? Quite a few people aren't registered for VAT and it would free up space on the screen if that could be disabled.Yes I understand, I did not even realize I did not add a setting for it :blush:

Would it be possible (big request :smile: ) to have the mod operate from a search query?Sounds like a very usefull addition to me too :-) I can not promise anything since it would not be something I consider very easy to do, and it would take quite some time probably as well. So much to do and so little time ....

I will try to add a remove sql file, and a prices inc on/off setting soon, and keep the search query in mind :-)

18 Oct 2006, 8:25 PM
#78
pixxi avatar

pixxi

Totally Zenned

Join Date:
Jan 2004
Location:
UK
Posts:
1,065
Plugin Contributions:
1

Re: Quick Updates plugin [support]

Thanks Paul - the 'trumbnails' work fine now :D

I'd seen the 'trumbnail' display text error and corrected it, but I hadn't thought to check the configuration_key :smile:

(Ps. There's also a 'desactivate' in the configuration display text)

19 Oct 2006, 8:10 PM
#79
covone avatar

covone

Zen Follower

Join Date:
Oct 2004
Posts:
409
Plugin Contributions:
0

Re: Quick Updates plugin [support]

I hv downloaded the latest ver of this mod. there are 3 sql files.

  • quick_update.sql
  • quick_update_ to_1_3_2.sql
  • quick_update_ to_1_3_3.sql
  • quick_update_ to_1_3_6.sql

Which sql file do I use?

Pls advise.

tks

19 Oct 2006, 8:32 PM
#80
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: Quick Updates plugin [support]

Fresh install? Use quick_update.sql