Welcome Guest, Not a member yet? Register   Sign In
How can I add a related products menu on my site
#1

[eluser]Fr334Ever[/eluser]
Hello ,
I have a shoop based on CI and I want to add a relatet products menu !
I have the table category and table product , and if there are other products that corespond to that category I want to load the from my product table !
Please help , if you can post a script too !
10x
#2

[eluser]cideveloper[/eluser]
Quote:if you can post a script too

I doubt anyone will write out the code for you on this one.

This will get you started. Make a function inside a model, call is something like get_related_products. Pass it the category and the current product_id. This function should retrieve all or some products from the table products that match with the category but not the current product. Return the results as an array to the controller and pass that to the view.
#3

[eluser]Fr334Ever[/eluser]
[quote author="cideveloper" date="1305189365"]
Quote:if you can post a script too

I doubt anyone will write out the code for you on this one.

This will get you started. Make a function inside a model, call is something like get_related_products. Pass it the category and the current product_id. This function should retrieve all or some products from the table products that match with the category but not the current product. Return the results as an array to the controller and pass that to the view.[/quote]

Can you poast an example script please !
10x
#4

[eluser]LinkFox[/eluser]
[quote author="Fr334Ever" date="1305204068"][quote author="cideveloper" date="1305189365"]
Quote:if you can post a script too

I doubt anyone will write out the code for you on this one.

This will get you started. Make a function inside a model, call is something like get_related_products. Pass it the category and the current product_id. This function should retrieve all or some products from the table products that match with the category but not the current product. Return the results as an array to the controller and pass that to the view.[/quote]

Can you poast an example script please !
10x[/quote]

This is quite complicated, learn by doing, no one likes a lazy coder. People are happy to provide help if you get stuck but not to hold your hand.
#5

[eluser]toopay[/eluser]
Why i feel at the same way with you, LinkFox? ;-)
@Fr334Ever : at least, please try to write it by yourself. But, whenever you hit a wall, with your code, you can come back here for some help ;-)




Theme © iAndrew 2016 - Forum software by © MyBB