Jump to content
Skittles

Optional Related Products, Version 4.0

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?

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Hello Dean @@dculley,

 

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

 

Rainer

Share this post


Link to post
Share on other sites

Maybe I didn't do it right,  I check it and it says blocked.

 

Send me a PM and I will respond to it.  Maybe that will work.

 

I don't use PM a lot so I might have done something wrong. 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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

Share this post


Link to post
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.............." ??

Share this post


Link to post
Share on other sites

The base has a "AUTO_INCREMENT".
See screenshot.

 

I started a new installation of course.

 

What else can be the cause of error?

post-57268-0-40275000-1446488878_thumb.png


No outside url's in signatures allowed - thanks

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Maybe you could give a try this for pop_id:

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

 

 

 

I do not understand where I'm supposed to do.

The database I do not see this type.


No outside url's in signatures allowed - thanks

Share this post


Link to post
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 -"

Share this post


Link to post
Share on other sites

The base does not have these types.
See screenshot.

You can make a screenshot where there are such types?

post-57268-0-32024500-1446492499_thumb.png

post-57268-0-11203600-1446492511_thumb.png


No outside url's in signatures allowed - thanks

Share this post


Link to post
Share on other sites

@@spidometrs,

 

it seems you have an older mysql version.

try with decimal or varchar or text

Edited by raiwa

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×