Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Cross Sell (X-Sell) Admin


dreamscape

Recommended Posts

  • 4 weeks later...

I do not know if this is address somewhere already but please help. Have just installed Cross Sell (X-Sell) with Admin.

 

When I click Cross Sell Products in admin I get the following error.

 

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/musika/public_html/eshop/catalog/admin/xsell.php on line 43

 

At the bottom of say product_info.php page I get the folowing error.

 

Fatal error: Maximum execution time of 30 seconds exceeded in /home/musika/public_html/eshop/catalog/includes/languages/english/xsell_products.php on line 13

 

I have tried to drop tables and create another as recommended but with no success yet. Please help!

Link to comment
Share on other sites

I do not know if this is address somewhere already but please help. Have just installed Cross Sell (X-Sell) with Admin.

 

When I click Cross Sell Products in admin I get the following error.

 

Parse error: parse error, unexpected T_DOUBLE_ARROW in /home/musika/public_html/eshop/catalog/admin/xsell.php on line 43

 

At the bottom of say product_info.php page I get the folowing error.

 

Fatal error: Maximum execution time of 30 seconds exceeded in /home/musika/public_html/eshop/catalog/includes/languages/english/xsell_products.php on line 13

 

I have tried to drop tables and create another as recommended but with no success yet. Please help!

 

 

I'm getting the same error... trying to hack my way through it as we speak, i'll post if / when i have some results

Link to comment
Share on other sites

K, found the culpret (at least with xsell.php)

 

Line 43, which reads:

'stores_id' => (int)$selected_store_id);

 

should read

 

'stores_id' > ((int)$selected_store_id);

 

just a cute little parse error, no biggie.

 

It seems to work ok for me, but i'm not 100% sure if it's correct, ymmv

 

good luck

Link to comment
Share on other sites

  • 2 weeks later...

Has anyone yet figured out a way to make the Cross Sell Recommend box appear on the Shopping Cart page? That's what I really wanted this to do, and I don't see any other contribution that does this. Yet, I've seen OSCommerce stores that can do that. Does anyone have any ideas on how to accomplish this?

 

I would also like to echo a few of the people here who would like to be able to pick categories for the cross selling, instead of having to do individual items. That would be a huge help to me.

 

Thanks! :)

 

Julieann

Link to comment
Share on other sites

  • 2 weeks later...

Hello everybody,

 

I use "X-Sell v2.2 for MS2.2" contribution. I'm trying to sort my products by Model instead of Name in a drop-down list of products in admin/categories.php but no luck so far? Maybe somebody can give me an advise on this. I'll appreciate any help.

 

Thanks in advance.

Irina.

Link to comment
Share on other sites

  • 2 weeks later...

This one works although after mixing and matching different versions of xsell_cart file produced errors or just no results. The mod that included a check box to add the product being viewed and any "XSell" products associated was nice though... but it didnt work for me since the shop I am modifying requires attributes for every single product without exception.... so after spending quite a bit of time and getting it to work... i realized it was useless in this case :D ;) You could add a Xsell product, but since there were no attributes to select... a total waste of time... the layout is nice, and probably could accept the attributes because the guy stacked them in a table with a checkbox instead of side by side...nice -- just no query/coding for attributes so any product that requires them (size, color, etc, yada yada) is disqualified

 

point is... if most of your products have attributes, its no good. If you are just selling a straight product, you can probably be happy with it.

 

You have to have Xsell installed first to use these

 

Has anyone yet figured out a way to make the Cross Sell Recommend box appear on the Shopping Cart page? That's what I really wanted this to do, and I don't see any other contribution that does this. Yet, I've seen OSCommerce stores that can do that. Does anyone have any ideas on how to accomplish this?

 

I would also like to echo a few of the people here who would like to be able to pick categories for the cross selling, instead of having to do individual items. That would be a huge help to me.

 

Thanks! :)

 

Julieann

Link to comment
Share on other sites

This one works although after mixing and matching different versions of xsell_cart file produced errors or just no results. The mod that included a check box to add the product being viewed and any "XSell" products associated was nice though... but it didnt work for me since the shop I am modifying requires attributes for every single product without exception.... so after spending quite a bit of time and getting it to work... i realized it was useless in this case :D ;) You could add a Xsell product, but since there were no attributes to select... a total waste of time... the layout is nice, and probably could accept the attributes because the guy stacked them in a table with a checkbox instead of side by side...nice -- just no query/coding for attributes so any product that requires them (size, color, etc, yada yada) is disqualified

 

point is... if most of your products have attributes, its no good. If you are just selling a straight product, you can probably be happy with it.

 

You have to have Xsell installed first to use these

 

THE SAME goes for the XSell Contrib, and the original Cross Sell Contrib that spawned the copy-cats... no Attributes to select so probably is not good for a shop that has products that require an attribute to be selected (color, size, etc, yada yada)... hey, want some shoes??? click here... LOL get it? (size??? Color maybe???) ;)

 

Has anyone yet figured out a way to make the Cross Sell Recommend box appear on the Shopping Cart page? That's what I really wanted this to do, and I don't see any other contribution that does this. Yet, I've seen OSCommerce stores that can do that. Does anyone have any ideas on how to accomplish this?

 

I would also like to echo a few of the people here who would like to be able to pick categories for the cross selling, instead of having to do individual items. That would be a huge help to me.

 

Thanks! :)

 

Julieann

Link to comment
Share on other sites

  • 1 month later...
Somebody else out there must have this problem and have a solution. I know it's got to do with the product id being reset when you press the buy now button - but I would really love some help here guys!!!!! :wacko:

 

Here's the solution to the 'Buy Now' button problem when your cart is not set to display after clicking.

 

In catalog/includes/modules/xsell_products.php at around Line 51 replace the "$info_box_contents["... statement with the following.

	   $info_box_contents[$row][$col] = array('align' => 'center',
										  'params' => 'class="smallText" width="33%" valign="top"',
										  'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] .'</a><br>' . $xsell_price. '<br><a href="' . tep_href_link(basename($PHP_SELF), 'action=buy_now&cPath=' . $HTTP_GET_VARS['cPath'] . '&xsell_id=' . $xsell['products_id'] . '&products_id=' . $product_info['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>');

 

In catalog/includes/application_top.php find the "case 'buy_now' :" statement and replace with

	  case 'buy_now' : 		  if (isset($HTTP_GET_VARS['xsell_id'])) {
							  $products_id_xs = $HTTP_GET_VARS['xsell_id'];
							} else {
								$products_id_xs = $HTTP_GET_VARS['products_id'];
							}
							if (isset($products_id_xs)) {
							if (tep_has_product_attributes($products_id_xs)) {
							  tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products_id_xs));
							} else {
							  $cart->add_cart($products_id_xs, $cart->get_quantity($products_id_xs)+1);
							}
						  }
						  if (isset($HTTP_GET_VARS['xsell_id'])) {
							  $link_params = 'cPath=' . $HTTP_GET_VARS['cPath'] . '&products_id=' . $HTTP_GET_VARS['products_id'];
						  } else {
							  $link_params = tep_get_all_get_params($parameters);
							}
						  tep_redirect(tep_href_link($goto, $link_params));
						  break;

 

'Buy now' will now act correctly with both types of basket and will also return the customer to the correct breadcrumb trail if you have mirrored products.

 

If someone else wants to test this works on their setup too and get back to me I will post an update to the contribution.

Link to comment
Share on other sites

Hello everybody,

 

I use "X-Sell v2.2 for MS2.2" contribution. I'm trying to sort my products by Model instead of Name in a drop-down list of products in admin/categories.php but no luck so far? Maybe somebody can give me an advise on this. I'll appreciate any help.

 

Thanks in advance.

Irina.

 

 

Irin,

 

Give this a try in your admin/categories.php

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select products_id, products_model from " . TABLE_PRODUCTS . " where products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by products_model");
} else {
 $products_query = tep_db_query("select products_id, products_model from " . TABLE_PRODUCTS . " where order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model']);
}
?>

<tr>
		<td class="main"><?php echo 'Cross Sell Products'; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_mselect_menu('products_xsell_ids[]', $products_array, $products_array_selected, 'size=10'); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
<?php // X-SELL by Kavita End ?>

 

I'm trying to figure out how to get it to be product model # and then the name next to it, but have not figured it out yet.

 

Good Luck.

 

Nate

Link to comment
Share on other sites

Irina,

 

Here is an update to what I posted....

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where p.products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by p.products_model");
} else {
 $products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model'] . ' - - - ' . $products['products_name']);
}
?>

 

This should not only sort by product model number but display BOTH the product model number and the product name in the box.

 

Good Luck.

 

Nate

Edited by JEWbacca
Link to comment
Share on other sites

Irina,

 

Here is an update to what I posted....

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where p.products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by p.products_model");
} else {
 $products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model'] . ' - - - ' . $products['products_name']);
}
?>

 

This should not only sort by product model number but display BOTH the product model number and the product name in the box.

 

Good Luck.

 

Nate

Thanks for your reply, Nate. I tryed both of your codes but, unfortunately, it doesn't work. My products are still sort by name not model. There must be something more to change the sorting option.

 

Thanks,

Irina.

Link to comment
Share on other sites

Thanks for your reply, Nate. I tryed both of your codes but, unfortunately, it doesn't work. My products are still sort by name not model. There must be something more to change the sorting option.

 

Thanks,

Irina.

 

Irina,

 

From my testing... no; its nothing more than just changing the sort order to be done by products_model instead of products_name. The more complicated part is getting it to query both the model and name from two different tables, but that should work too now.

 

Did you copy entire code I posted and replace it in your admin/categories.php? Are you getting errors of any type?

Link to comment
Share on other sites

Irina,

 

From my testing... no; its nothing more than just changing the sort order to be done by products_model instead of products_name. The more complicated part is getting it to query both the model and name from two different tables, but that should work too now.

 

Did you copy entire code I posted and replace it in your admin/categories.php? Are you getting errors of any type?

I got it working. Sorry, that was my mistake. Now it's sorting by model --- name. Thanks a lot for your help, Nate. This is exactly what I needed. Now I need to figure out how to make the same with my Bundled Products contribution.

 

Regards,

Irina.

Edited by Irin
Link to comment
Share on other sites

I got it working. Sorry, that was my mistake. Now it's sorting by model --- name. Thanks a lot for your help, Nate. This is exactly what I needed. Now I need to figure out how to make the same with my Bundled Products contribution.

 

Regards,

Irina.

You know, it's very strange but I have my products listed 3 times each in the dropdown list. Do you know why?

 

Thanks.

Link to comment
Share on other sites

You know, it's very strange but I have my products listed 3 times each in the dropdown list. Do you know why?

 

Thanks.

 

 

Give this one last try, it should fix an error that you migh of got when adding a new product and also fix it from showing up more than once. Thanks to JanZ for the bug fix and suggestion about the languages_id :blink:

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = '". $languages_id ."' and p.products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by p.products_model");
} else {
 $products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = ". $languages_id ." order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model'] . ' - - - ' . $products['products_name']);
}
?>

<tr>
		<td class="main"><?php echo 'Cross Sell Products'; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_mselect_menu('products_xsell_ids[]', $products_array, $products_array_selected, 'size=10'); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
<?php // X-SELL by Kavita End ?>

Link to comment
Share on other sites

Give this one last try, it should fix an error that you migh of got when adding a new product and also fix it from showing up more than once. Thanks to JanZ for the bug fix and suggestion about the languages_id :blink:

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = '". $languages_id ."' and p.products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by p.products_model");
} else {
 $products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = ". $languages_id ." order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model'] . ' - - - ' . $products['products_name']);
}
?>

<tr>
		<td class="main"><?php echo 'Cross Sell Products'; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_mselect_menu('products_xsell_ids[]', $products_array, $products_array_selected, 'size=10'); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
<?php // X-SELL by Kavita End ?>

Yep, now is better. I just have two different products selected at once. Is it suppose to be like this?

 

Thanks.

Link to comment
Share on other sites

Hi!

 

I installed x-sell and it works, but I have one (pretty big) problem. When I try go to the x-sell admin section I just get a blank screen. I checked, and double checked and I can't figure out what the problem is.

 

What did I miss?!?

Link to comment
Share on other sites

  • 1 month later...

please help im getting this error:

 

 

[error]Fatal error: Call to undefined function: link_get_variable() in /home/cust1/user1116323/html/catalog/admin/products_attributes.php on line 18[/error]

Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Link to comment
Share on other sites

please help im getting this error:

[error]Fatal error: Call to undefined function: link_get_variable() in /home/cust1/user1116323/html/catalog/admin/products_attributes.php on line 18[/error]

 

its not a brand new installation but all i had done so far was:

 

1. added about 20 test products

2. deleted all product attributes and created my own

3. changed alot of stuff in stylesheet.css

4. created about 3 customers

 

when i installed PPC i did not do it manually... but the only file that had been modified was index.php in /catalog/...

 

the above error occurs in the Admin area; Catalog-->product attributes---> error above

everything else seems to be working fine and wholesale customers see wholesale prices and the same for retail...

i just cant get into my "product attributes" anymore...

Edited by herot

Did you get rid of the voices in your head? Do you now miss them and the things that they said?

-David Gilmour

Link to comment
Share on other sites

  • 3 weeks later...
Give this one last try, it should fix an error that you migh of got when adding a new product and also fix it from showing up more than once. Thanks to JanZ for the bug fix and suggestion about the languages_id :blink:

 

<?php
// X-SELL by Kavita Begin
$products_query_selected = tep_db_query("select xsell_id from " . TABLE_PRODUCTS_XSELL . " where products_id = '" . $HTTP_GET_VARS['pID'] . "'");
$products_array_selected = array(array('id' => ''));
while ($products = tep_db_fetch_array($products_query_selected)) {
  $products_array_selected[] = array('id' => $products['xsell_id']);
}

if ($HTTP_GET_VARS['pID']) {
$products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = '". $languages_id ."' and p.products_id != '" . (int)$HTTP_GET_VARS['pID'] . "' order by p.products_model");
} else {
 $products_query = tep_db_query("select pd.products_name, p.products_id, p.products_model from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd ON (p.products_id = pd.products_id) where language_id = ". $languages_id ." order by products_model");
}
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
								 'text' => $products['products_model'] . ' - - - ' . $products['products_name']);
}
?>

<tr>
		<td class="main"><?php echo 'Cross Sell Products'; ?></td>
		<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . '?' . tep_draw_mselect_menu('products_xsell_ids[]', $products_array, $products_array_selected, 'size=10'); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
<?php // X-SELL by Kavita End ?>

 

Hello - I've tried implementing this xsell addon, but the products selected to be cross sold are not getting into the database. I've double checked all the code, and implemented the code recommended above. I get the multi select dropdown list in the edit UI, but after selecting one or more products, hitting "preview" and then "update" - nothing. No changes to the products_xsell db are made. Am I missing something? Thanks for your help!

Link to comment
Share on other sites

Hello - I've tried implementing this xsell addon, but the products selected to be cross sold are not getting into the database. I've double checked all the code, and implemented the code recommended above. I get the multi select dropdown list in the edit UI, but after selecting one or more products, hitting "preview" and then "update" - nothing. No changes to the products_xsell db are made.

I'm having exactly the same problem.

I've had the X-sell up and running for over a year, and it's working fine. The Kavita-addon sounds great, so I added it just now. I shows the existing cross references as it should but makes no changes to the db.

Any ideas?

Edited by Grey Lion
Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

I use "X-Sell v2.2 for MS2.2" contribution. I have 2 queries:

 

1. Is there a way to have a drop down box for qty wanted. For my main product I have to select a qty, so ideally I could select that, and several recommended xsell products and then hit Add to basket to put every thing into it in one go.

 

2. Within admin, when I go into the xsell page, all my products images are the original size rather than 100x100 . I am using a keep image proportions contrib which could be impacting it. As it is, it makes the page too long to really manage. :(

 

Thanks

 

W

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