Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Optional Related Products, Version 4.0


Skittles

Recommended Posts

It was brought to my attention that my related products are no longer showing up.  I just spent time rechecking all the files with WinMerge and checking the changed files.  All match the new install instructions and the update to 5.3.  So I don't know what happened.  

 

I have also removed the sql data file and reinstalled it.  I added one item to the related screen.  It shows up correctly in the data base.  But will not show up on the site.

 

Any hints?

Link to comment
Share on other sites

Hello Dean @@dculley,

 

it would be helpful to know if you changed anything since it worked and if yes what you changed.

 

regards

Rainer

Link to comment
Share on other sites

@@raiwa Hi Rainer,

 

Sorry for the delay, had to play with the family. 

With in the last 2 weeks I have updated KissIt and Related Products to the latest levels.  Than I added images to checkout page.  They noticed related products was missing a little time after the Related Products update.  Not sure what happened.

 

What do you need to look at?

 

I running osc2.3.4 / bootstrap / better checkout.  And yes KissIt and RP are both BS versions.

Link to comment
Share on other sites

Hello Dean @@dculley,

 

I can only recommend to try a complete reinstallation if you have not too much related products defined. Uninstall all, including dtabase and install again.

If this doesn't help, you can PM your store and admin URL and I'll have a look.

 

regards

Rainer

Link to comment
Share on other sites

Hello Dean @@dculley,

 

I didn't receive any Personal Message from you, thought you had this solved.

 

Rainer

Link to comment
Share on other sites

  • 1 month later...

@@raiwa

 

Hi,
I use OSC 2.3.4 BS Gold.
I installed Optional Related Products, but get an error.

I add the related of products and get the error:

1366 - Incorrect integer value: '' for column 'pop_id' at row 1

insert into products_related_products values ('', '29', '40', '2')

 

Link:
//mysite.com/admin/optional_related_products.php?pop_id=3&products_id_master=29&products_id_slave=40&pop_order_id=2&action=Insert&products_id_view=29

Somehow empty value for pop_id.

How can I fix this?

 

Many thanks!

post-57268-0-66257400-1446479894_thumb.png

No outside url's in signatures allowed - thanks

Link to comment
Share on other sites

Above the wrong link.

This link:
//mysite.com/admin/optional_related_products.php?products_id_master=29&products_id_slave=40&pop_order_id=2&action=Insert&products_id_view=29

Edited by spidometrs

No outside url's in signatures allowed - thanks

Link to comment
Share on other sites

Hello @@spidometrs,
 
The empty value is correct if you create a new optional product relation. It is auto increment so a new incremental number should be automatical assigned if empty.
Can you please check in your database:
Table: "products_related_products"
Column: "pop_id"
Select "Structure"

Check that under "Extra" it says: "AUTO_INCREMENT"

If not, modify and set to "AUTO_INCREMENT"

If this doesn't help, you could try to set "Type" less strict to: generic Numeric ("-")

 

Did you run a new database installation with "sql setup utility" and "Install SQL for New Install of related products.............." ??

Link to comment
Share on other sites

@@spidometrs,

 

Sorry, I never got that error reported.

 

Maybe you could give a try this for pop_id:

set "Type" less strict to: generic Numeric ("-")

 

Allthough it's not the fine way.

Link to comment
Share on other sites

@@spidometrs,

 

Table: "products_related_products"
Column: "pop_id"
Select "Structure"

Click "change" (the pencil icon)

For "Type" instead of "Numeric Int" try with "Numeric real" or "Numeric -"

Link to comment
Share on other sites

@@spidometrs,

 

it seems you have an older mysql version.

try with decimal or varchar or text

Edited by raiwa
Link to comment
Share on other sites

Does not allow to save as varchar or text.

And it is certainly wrong.
It is necessary to fix the addon, but not change the db.

It is necessary to remove this addon.
It does not work for the BS GOLD.

Thank you for trying to help.

No outside url's in signatures allowed - thanks

Link to comment
Share on other sites

I'll try to have a deeper look tomorrow. It works for all other users here in the forum and in all my test stores. It's not a bs problem but a database problem

Link to comment
Share on other sites

 It's not a bs problem but a database problem

Perhaps you're right, but other additions are working properly this database.

Both the BS GOLD works fine with this database.

 

If you can see tomorrow what you can do.

 

Thank you!

No outside url's in signatures allowed - thanks

Link to comment
Share on other sites

Hello Sergey @@spidometrs,
 
I modified the database queries so no empty value for "pop_id" is passed to the database any more.

 

These  in catalog/admin/optional_related_products.php

lines 57,  70, 74, 89, 99 (same changes in all lines)

            tep_db_query("insert into products_related_products values ('', '" . (int)$products_id_master . "', '" . (int)$products_id_slave . "', '". (int)$pop_order_id."')");

are modified to:

               tep_db_query("insert into products_related_products (pop_products_id_master, pop_products_id_slave, pop_order_id) values ('" . (int)$products_id_master . "', '" . (int)$products_id_slave . "', '". (int)$pop_order_id."')");

I prepared a file for you please just replace it and give it a try.

 

I can't check due to my database didn't produce that error.

 

Please let me know if it works for you, I'll upload then an update with this fix.

 

Thank you and kind regards

Rainer

Link to comment
Share on other sites

Hi raiwa, @@raiwa

 

I downloaded the file optional_related_products.php.
No error.
The 'Insert' button works. The product adds to related.
Button 'Reciprocate' works.
Button 'Inherit' is not working. It does not add data to the database. But the error does not show. Simply reload the page, and adds nothing.

Edited by spidometrs

No outside url's in signatures allowed - thanks

Link to comment
Share on other sites

@@spidometrs,

 

Are you sure that you are using the inherit option correct??

You need a product which has already a related product asigned. Then you use that first product to asign to a new product the same related products.

 

I'm not sure if I explain good.

 

Example:

 

First define to "A bugs live" the product "Beloved" like a related product.

Then select in "A" a new product let's say "Speed" and in "B" select "A bugs live".

Click "Inherit" button and you will have "Beloved" asigned to "Speed".

 

In my test store it works.

 

regards

Rainer

Edited by raiwa
Link to comment
Share on other sites

Yes you are right.
This button also works.
I misunderstood its function.
Thanks a lot for the help!

I knew somehow work this addition.
I thought that I will be able to link the two products, which then can not be bought separately.
I thought that if I link the two products, you can only buy two products at once.

But I was wrong.
You understand what I'm saying?
What addon can do it?

Edited by spidometrs

No outside url's in signatures allowed - thanks

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