Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Group Names not appearing after hitting back button


wolfy

Recommended Posts

HI All

 

I've installed this contribution and everything works fantastically, :) except on the categories pages, after entering a new product and adding the pricing for the various groups, once you hit the preview button and if for some reason you need to go back instead of update - the groups names then dont appear on the categories page.

 

I've tried looking through various versions of SPPC to see if I can find a difference in any of the code on that page but cant seem to find anything.

 

I'm suspecting that the error must lie somewhere in the following bit of code:

 

<?php
}

if (isset($HTTP_GET_VARS['read']) && ($HTTP_GET_VARS['read'] == 'only')) {
  if (isset($HTTP_GET_VARS['origin'])) {
	$pos_params = strpos($HTTP_GET_VARS['origin'], '?', 0);
	if ($pos_params != false) {
	  $back_url = substr($HTTP_GET_VARS['origin'], 0, $pos_params);
	  $back_url_params = substr($HTTP_GET_VARS['origin'], $pos_params + 1);
	} else {
	  $back_url = $HTTP_GET_VARS['origin'];
	  $back_url_params = '';
	}
  } else {
	$back_url = FILENAME_CATEGORIES;
	$back_url_params = 'cPath=' . $cPath . '&pID=' . $pInfo->products_id;
  }
?>
  <tr>
	<td align="right"><?php echo '<a href="' . tep_href_link($back_url, $back_url_params, 'NONSSL') . '">' . tep_image_button('button_back.gif', IMAGE_BACK) . '</a>'; ?></td>
  </tr>
<?php
} else {
?>
  <tr>
	<td align="right" class="smallText">
<?php
/* Re-Post all POST'ed variables */
  reset($HTTP_POST_VARS);
  while (list($key, $value) = each($HTTP_POST_VARS)) {
// BOF Separate Pricing per Customer
	if (is_array($value)) {
	  while (list($k, $v) = each($value)) {
	  echo tep_draw_hidden_field($key . '[' . $k . ']', htmlspecialchars(stripslashes($v)));
	  }
	} else {
// EOF Separate Pricing per Customer
	  echo tep_draw_hidden_field($key, htmlspecialchars(stripslashes($value)));
	}
  }
  $languages = tep_get_languages();
  for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
	echo tep_draw_hidden_field('products_name[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_name[$languages[$i]['id']])));
	echo tep_draw_hidden_field('products_description[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_description[$languages[$i]['id']])));
	echo tep_draw_hidden_field('products_head_title_tag[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_head_title_tag[$languages[$i]['id']])));
	echo tep_draw_hidden_field('products_head_desc_tag[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_head_desc_tag[$languages[$i]['id']])));
	echo tep_draw_hidden_field('products_head_keywords_tag[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_head_keywords_tag[$languages[$i]['id']])));
	echo tep_draw_hidden_field('products_url[' . $languages[$i]['id'] . ']', htmlspecialchars(stripslashes($products_url[$languages[$i]['id']])));
  }
  echo tep_draw_hidden_field('products_image', stripslashes($products_image_name));

  echo tep_image_submit('button_back.gif', IMAGE_BACK, 'name="edit"') . '  ';

  if (isset($HTTP_GET_VARS['pID'])) {
	echo tep_image_submit('button_update.gif', IMAGE_UPDATE);
  } else {
	echo tep_image_submit('button_insert.gif', IMAGE_INSERT);
  }
  echo '  <a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($HTTP_GET_VARS['pID']) ? '&pID=' . $HTTP_GET_VARS['pID'] : '')) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
?></td>
  </tr>
</table></form>

 

Just wondering if this is only me that this is happening to or has anyone else experienced the same issue, also is there a way to fix this.

 

Thanking you all in advance for your time

 

rgds

wolfy

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.
Note: Your post will require moderator approval before it will be visible.

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...