Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] Cross Sell (X-Sell) Admin


dreamscape

Recommended Posts

Thanks for that.

I have cut 'n' pasted the query into the appropriate db but it returns the following error!

Is this a clue?

Appreciate your help.

 

Error

 

SQL-query :

 

ALTER TABLE products_xsell ADD ID int( 10 ) NOT NULL AUTO_INCREMENT ,

ADD PRIMARY KEY ( ID ) FIRST

 

MySQL said:

 

 

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'FIRST' at line 2

Back

Link to comment
Share on other sites

Check your mysql and see if you need to place the default first or the not null.

I have noticed in 2 shops I work on that one has the default appearing first and the other has the null field first

Link to comment
Share on other sites

Appreciate your reply!

Let me explain, I am extremely new to this.

If you have time can you explain with a little more detail and in basic terms what I need to do and just as important the effect so I do not need to ask again, hopefully!

For clarification I have included the table info.

 

Field-------------Type------Attributes--Nul---Default---Extra Action

ID----------------int(10)--------------------No-------------auto_increment

products_id----int(10)----UNSIGNED---No----1

xsell_id---------int(10)----UNSIGNED---No----1

sort_order------int(10)---UNSIGNED---No-----1

 

I hope this helps.

Link to comment
Share on other sites

To anyone who has:

-Installed Cross (X) Sell and Cross (X) Sell admin.

-Not received any errors.

-Had the admin package seemingly grouping products OK and holding the setting

-BUT has not had the products that were selected in Cross (X) Sell admin display on the live site.

 

-Then resolved the problem and now has a fully functioning site.

 

Please, please respond to this thread.

My site is going live next week, I have performed 4 installations each time onto a clean restored from backup site to no avail.

Have scoured this and any related thread.

 

I would really appreciate some pointers.

 

Thanks in advance.

Link to comment
Share on other sites

A massive thanks to Strider42 who responded to the above posting with a solution which resolved the X Sell products not showing on the live site.

 

Happy day :D

 

Posting as received:

 

Hi,

 

I had the same problem and the fix was to turn off the cache in admin:

 

Configuration:Cache - set this to false.

 

Worked for me.

 

The code in catalogproduct_info.php reads:

 

Code:

<?php

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

 

 

 

check the if statement.

Link to comment
Share on other sites

  • 3 weeks later...

Could you help me please?

I?ve installed the contribution in MS1 and I figured out that if a customer buy a product that has xsell products in the product_ingp.php page the box of "also recommended" is not shown anymore..

This page shows the "also purchased" box but not the "also recommended" one.

 

Another: could anyone developed a sort function for the admin?

Clicking on id, model, name anyone could resort the list of products

 

Great Job Benjamin!!!!

Link to comment
Share on other sites

I have installed the contribution. However when I click on Cross Sell Products in admin, the page is totally blank. There is no writing or anything. I have double checked that I uploaded every file, and modified the files correctly, but still nothing.

 

Thanks

Link to comment
Share on other sites

I have installed the contribution. However when I click on Cross Sell Products in admin, the page is totally blank. There is no writing or anything. I have double checked that I uploaded every file, and modified the files correctly, but still nothing.  

 

Thanks

 

Double check and see if you missed something. Check that you uploaded the database files, check that you put the settings in defines, etc.

Also, make sure you installed it on the right version

Link to comment
Share on other sites

Hi Benjamin!

Thanks for the tip of the cache but the problem stills there.

when a product has been purchased, it?s product_info only shows the "also purchased" but not the "we recommed" box.

In the others products (those who hasn?t been purchased) the bos of "we recommend" is correctly shown.

 

I?m not a coder but I tried many things but I couldn?t solve the problem.

 

I tried to duplicate and hack the to have 2 boxes

<?php

//added for cross -sell HACK

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

?>

 

but this is didn?t work at all

 

Could you have any idea?

Is this new or others had the similar problem?

 

THANKS A LOT!!!!!!!!!!!

Link to comment
Share on other sites

Are you sure you did not skip step 4

STEP 4

Modify catalog/product_info.php to include xsell_products.php above also_purchased.

So seach for this section

<?php

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

 

And change it to this

<?php

//added for cross -sell

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_also_purchased(3600);

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

} else {

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

Link to comment
Share on other sites

Better yet - ttry this

Look for

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td>

<?php

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

?>

</td>

</tr>

 

 

 

and put this before or after it - as you decide

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

<tr>

<td><?php echo include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS); ?></td>

</tr>

Link to comment
Share on other sites

Thanks!

It works now!

 

My code was

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_also_purchased(3600);

} else {

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

 

instead of

 

if ( (USE_CACHE == 'true') && !SID) {

echo tep_cache_also_purchased(3600);

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

} else {

include(DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS);

include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);

}

}

 

The second option works fine too, but I get a "1" in the layout after the module is included and I couldn?t fix it. It?s not of design but I really don?t care at this point.

 

Again and again... GREAT JOB!!!

THANKS!

 

I will try to create the function to sort the admin in many way by clicking in the headlines.

If I figure it out, I will notice you.

For MS1... I?m not using MS2

Link to comment
Share on other sites

Hi Guys,

 

Thanks for the great mod. I only have one small problem I can't seem to fix.

 

I seem to get the "We Recommend" box regardless of whether or not there is a x-sell product assigned to it. It's showing up on every product page.

 

It's actually creating the whole box, but since there are no products assigned to it, it's showing up completely empty with the header just floating there.

 

Anybody else have this problem? I'm PHP newb so any help will be appreciated!

Link to comment
Share on other sites

The second option works fine too, but I get a "1" in the layout after the module is included and I couldn?t fix it.

 

Anyone know what's causing the "1"? I'm getting it to and can't seem to see what's calling it?

 

Other than that the mod rocks!

Link to comment
Share on other sites

Yeah. For some reason the second option is generating some orpahan. I will take a look at it when time permits but as it is not crucial and the other way resolves the same problem - I will not rush to ts this

 

Glad you guys like the mod. Working on more!

Link to comment
Share on other sites

Hi, I installed the x-sell module and it seemed to be working fine, untill I checked the cross-selled products in the shop. Nothing.

 

I checked the db and it turned out that there are no product_id?s in the table. The two other fields are correctly filled. Does anyone have/had the same problem? And more important: how did you solve it..?

 

Kind regards,

 

 

Wolter

Link to comment
Share on other sites

Hi Guys,

 

Thanks for the great mod. I only have one small problem I can't seem to fix.

 

I seem to get the "We Recommend" box regardless of whether or not there is a x-sell product assigned to it. It's showing up on every product page.  

 

It's actually creating the whole box, but since there are no products assigned to it, it's showing up completely empty with the header just floating there.

 

Anybody else have this problem? I'm PHP newb so any help will be appreciated!

 

Open up the file and set:

if ($num_products_xsell > 0) {

at about line 17.

Link to comment
Share on other sites

Contribute seems to be great, but unfortunatly, it doesn't work very good for me. After installing I get this warning when I try to visit the 'catalog' tab in the admin:

 

Parse error: parse error, expecting `')'' in /var/www/domains/7338991942/www/web/store/admin/categories.php on line 225

 

I'm a bit of a php newb, but I was hoping someone could help me. Thank you very much. :)

Link to comment
Share on other sites

The products that I want to sell are very little things, more acccessoires for my existing products. I was wondering if the following is possible: I would like to have no link to the productinfo page attatched to the picture and text, so only let the 'buy now' button work. This is because no extra information is needed for these products in my store.

 

This is the code now:

'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'], '', '') . '</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(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>')

 

What changes should I make to make this possible?

Link to comment
Share on other sites

'text' => 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(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) .'</a>');

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