Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contrib] Quick Price Updates for SPPC


Jan Zonjee

Recommended Posts

I need some help on SPPC quick updates

 

I upgraded from Quick Price Updates (http://addons.oscommerce.com/info/122/v,22) to Quick_updates_for_SPPC_v1.5

I deleted the old configuration tables in PHPAdmin and used the new configuration and replaced the 2 new quick_updates.php files in admin

 

When in admin - Quick updates and click "Select customer group" or any other drop down - I get redirected to admin/index.php?SID

 

The SPPC contribution part appears and is testing ok only quick updates

 

Any help please

Ok, downloaded ver. 1.4 and now works fine

If anything still needs changing please advice

Getting the Phoenix off the ground

Link to comment
Share on other sites

  • 1 year later...
  • Replies 92
  • Created
  • Last Reply

Top Posters In This Topic

I finally got this installed into osc 2.3.1 (Quick Updates 2.9.2 for osc 2.3.1, then Quick Updates for SPPC v1.5 for osc 2.2). -- although it seems that the v1.5 is actually v1.4 in the package...

 

The original admin/quick_updates.php that came with the package did have to be tweaked a bit. There are four instances of [$x] that need to be deleted in order for the pricing to display correctly when switching between groups. As there is no documentation for converting the original file, especially for a heavily modified site, this did take a bit of time to decipher this one file to make all the changes for SPPC.

 

Since I have the MSRP contribution, I added the MSRP and a Cost (COGS) field to Quick Updates and they work great.

 

I love the Quick Updates and SPPC!! It's so nice to have everything in one editable list!

Edited by The Munch
Link to comment
Share on other sites

I finally got this installed into osc 2.3.1 (Quick Updates 2.9.2 for osc 2.3.1, then Quick Updates for SPPC v1.5 for osc 2.2). -- although it seems that the v1.5 is actually v1.4 in the package...

 

The original admin/quick_updates.php that came with the package did have to be tweaked a bit. There are four instances of [$x] that need to be deleted in order for the pricing to display correctly when switching between groups. As there is no documentation for converting the original file, especially for a heavily modified site, this did take a bit of time to decipher this one file to make all the changes for SPPC.

 

Since I have the MSRP contribution, I added the MSRP and a Cost (COGS) field to Quick Updates and they work great.

 

I love the Quick Updates and SPPC!! It's so nice to have everything in one editable list!

Are you going to share the changes for 2.3.1 in the contribution?

Link to comment
Share on other sites

Are you going to share the changes for 2.3.1 in the contribution?

 

After installing the QU 2.9.2 for osc 2.3.1, the QU for SPPC really only needed a couple of changes:

 

admin/includes/languages/english.php: (Was: BOX_CATALOG_QUICK_UPDATES)

/* ## LINE ADD: Quick Updates 292 for osc 2.3.1 ## */
define('BOX_CATALOG_CATEGORIES_QUICK_UPDATES', 'Quick Updates');

admin/includes/boxes/catalog.php: (This is how it gets written in 2.3.1)

/* ### BOF: Quick Updates 292 for osc 2.3.1 ### */
  array(
	'code' => FILENAME_QUICK_UPDATES,
	'title' => BOX_CATALOG_CATEGORIES_QUICK_UPDATES,
	'link' => tep_href_link(FILENAME_QUICK_UPDATES,'')
  ),
/* ### EOF: Quick Updates 292 for osc 2.3.1 ### */

Edited by The Munch
Link to comment
Share on other sites

  • 2 weeks later...

I can't get the prices to update in quick_updates.php. The regular Retail prices update just fine, but none of the other groups will save. This is what I have in the Case 'update':

			  if($_POST['product_new_price']){
			   foreach($_POST['product_new_price'] as $id => $new_price) {
					 if ($_POST['product_new_price'][$id] != $_POST['product_old_price'][$id] && $_POST['update_price'][$id] == 'yes') {
					   $count_update++;
					   $item_updated[$id] = 'updated';
/* ### LINE ADD: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */
  if ($_POST['customers_group_id'] == '0') {
					   mysql_query("UPDATE " . TABLE_PRODUCTS . " SET products_price=$new_price, products_last_modified=now() WHERE products_id=$id");
/* ### BOF: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */
  } else {
   if ($_POST['cg_price_in_db'][$id] == 'yes') {
 if (trim($_POST['product_new_price'][$id]) == '') {
 mysql_query("DELETE FROM " . TABLE_PRODUCTS_GROUPS . " WHERE products_id='" . $id . "' AND customers_group_id = '" . $_POST['customers_group_id'] ."'");  
	} else {
mysql_query("UPDATE " . TABLE_PRODUCTS_GROUPS . " SET customers_group_price='" . $new_price . "' WHERE products_id='" . $id . "' AND customers_group_id = '" . $_POST['customers_group_id'] ."'");
	}
   } elseif ($_POST['cg_price_in_db'][$id] == 'no') {
 mysql_query("INSERT INTO " . TABLE_PRODUCTS_GROUPS . " SET products_id='" . $id . "', customers_group_price='" . $new_price . "', customers_group_id = '" . $_POST['customers_group_id'] ."'");
   }
  }
/* ### EOF: Quick Updates for SPPC-Separate Price Per Customer v1.3 ### */
					 }
			   }
			}

 

I had also tried the suggestion from Post 56, but it had no affect.

Edited by The Munch
Link to comment
Share on other sites

Fixed it - scrapped the old version, took the quick_updates.php from the "Quick Price Updates for SPPC v1.5" and put my mods for MSRP and Cost price info into that file, which is what I should've done to begin with, instead of trying to modify the old file. Now everything works beautifully!!

 

Thanks for this great contribution - I really need it!! There's so much potential for what can be included in this - as long as you have the real estate for it!

Link to comment
Share on other sites

  • 3 months later...

Hi,

 

I use server with PHP5.2.17 ..... with mySQL5.1.40

 

When I select other Customer Group than retal (id=0), there are no prices at all and the db gets price 0,00 for all products ... Have tried also suggestion from post 56, no success ...get an OR error ...

 

What did I miss ? Thanks for pointing me in right direction ..

Link to comment
Share on other sites

OK, forget the OR error, my mistake with brackets ...

 

Anyway, seems that the contribution is no longer working at all since it doesnt update even the retail prices when I hit preview ...

 

If someone has it running OK on PHP5.2x or PHP5.3x, please upload new file or post some solution.

Tnx

Link to comment
Share on other sites

Another detail while testing ...

 

For the retail group: If I change the prices individualy the prices get corrected. If I apply group discount in % or in value nothing happens.

 

For other groups than id=0, problem with price 0,00 still persist.

Link to comment
Share on other sites

  • 5 months later...

Suhy, I'm also having the same experience as you. I installed but am getting redirected on just about every click. Plus the prices don't change when you press the preview button, no matter what you put in for the value.

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

Hello,

 

I know this thread isn't active lately but its worth a try.....Quick Price Updates works great for me but for "Net" and "Gross" price only; I need to update a large number of "Retail" prices. I tried playing around with the code myself to add this field to no avail.

 

I hope some one can help me because this would save me a tremendous amount of time.

 

Jane N.

Edited by guberish
Link to comment
Share on other sites

  • 2 years later...

I am having the worst time with trying to get this module working. I've tried versions 1.2, 1.3, 1.4, and 1.5. All have one problem or another with either the top fields not holding settings, or when set loading the index.php page instead (looks like that's being caused by the hidden osCAdminID field as when I pull it from the form that stops at least) but... I can't get ANY of these versions to actually update the database!

 

I've tried fixing v1.5 as it had the least number of problems out of the gate and I figured it was the latest so likely best to try working from given how NONE of them worked...

 

The SQL isn't the problem, it's the form from what I can tell. The IF blocks for the tests on updated values aren't being entered because of some reason I can't figure out. I've put test trace statements above and below the IF blocks and sure enough... it's passing right over them.

 

The IF statements for each updated section like:

if(_POST['product_new_price']){

 

are failing the test, because it looks like the vars aren't actually being passed back to the browser for the POST form. I've tried messing around with various incantations of the form declaration, to no avail. I've blown 2 days now on trying to figure out this, and am about to abandon the add-on and just write one from scratch at this point. I've got test code I've written that is succeeding with the IF check, when the vars are being passed back into the browser. When I check the form submission with a var_dump I'm getting an EMPTY arrays tho.

 

I'm running php 5.6.27 with Apache 2.2.15. Not that I think that's the issue at hand as my test code is working fine.

 

I'm running OSC 2.3.4-GOLD Responsive with the latest SPPC version "BOOTSTRAP - SPPC 2.3.4 BS GOLD - v1.1b" tho I also don't think that's salient as it doesn't appear as if the scheme has changed in a long time.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...