Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Product Sets v2.0 r2 - issue


torquemada

Recommended Posts

Hi all.

 

I'm trying install Product Sets v2.0 r2 contribution.

Open up catalog/admin/categories.php and look for this line around line number 13.

require('includes/application_top.php');

 

and replace it with this...

 

require('includes/application_top.php');

 

/* Products Set v1.0 BOF */

foreach ($_REQUEST as $k => $v) { $$k = stripslashes($v); }

if (do == "ajax" and $cmd != null and is_numeric($mid) and is_numeric($sid)) {

switch ($cmd) {

case 'add': {

tep_db_query("delete from products_sets where mid=$mid and sid=$sid");

tep_db_query("insert into products_sets values('$mid', '$sid')");

$sr=tep_db_query("select * from products_sets where mid=$mid");

while ($so=mysql_fetch_object($sr)) {

$po=mysql_fetch_object(tep_db_query("select * from products, products_description where products.products_id='".$so->sid."' and products.products_id=products_description.products_id"));

?><tr><td class="main"><?php echo $po->products_name;?></td><td class="main"><a href="java script: doCmd('remove', <?php echo $mid;?>, <?php echo $po->products_id;?>);">[REMOVE]</a></td></tr><?php }

break;

}

case 'remove': {

tep_db_query("delete from products_sets where mid=$mid and sid=$sid");

$rr=tep_db_query("select * from products_sets where mid=$mid");

while ($ro=mysql_fetch_object($rr)) {

$po=mysql_fetch_object(tep_db_query("select * from products, products_description where products.products_id='".$ro->sid."' and products.products_id=products_description.products_id"));

?><tr><td class="main"><?php echo $po->products_name;?></td><td class="main"><a href="java script: doCmd('remove', <?php echo $mid;?>, <?php echo $po->products_id;?>);">[REMOVE]</a></td></tr><?php }

break;

}

default : { break; }

}

die();

}

/* Products Set v1.0 EOF */

 

when i make all steps i have error:

Parse error: syntax error, unexpected T_DO in /.../..../..../.../admin/categories.php on line 17

 

 

line 17 = switch ($cmd) {

 

Anyone can help me?

 

P.S Sorry for my english

Link to comment
Share on other sites

  • 3 weeks later...

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