Jump to content
CYTechnologies

[Module] UPDATED - Related Products v0.1

Recommended Posts

Hey all,

Module: Related Products
Version: 0.1
Tested On: 1.2.1
Cost: Free

This module will automatically put related products on a selected product page.

Update:
The products image is now included for display.

To learn more, see it in action, and to download it please go to:
http://cytservices.com/our-products/

Share this post


Link to post
Share on other sites

Hi
Has this been tested on 1.2.2.0 at all. I have installed it and when I go to a product without any tags I get the error

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\prestashop1220\modules\cyrelatedproducts\cyrelatedproducts.php on line 62

and when I do add tags it all works but the page formatting is all over the place both with a modified theme and the original Prestashop one

Thanks

Share this post


Link to post
Share on other sites

There's no error message now, still having problems with page layout which I will fix, I think that could be due to my products having customization options and they clash with the placing of your information.

Good little module, thanks for the quick update

Share this post


Link to post
Share on other sites

Hi,
I have improved the page layout for me, especially on pages with customisation fields by adding
after the {/foreach} line of code, I also added a
after the {/if} to make the description start neatly under the picture.

You might want to test this yourself and include in your code if you think worthwhile, I have tested the code on 1.2.2.0 and 1.2.3.0.

Regards

Share this post


Link to post
Share on other sites

Thanks for a great module. Is there a way to include short description and price for the related products?

Share this post


Link to post
Share on other sites

Hi CYTechnologies

Many many thanks for this.
Could you explain to me how display it like "in the same category" and above it (inverse "related products" and "in the same category"

Thaks again

regards

Share this post


Link to post
Share on other sites

Hello, I've intalled this module but now I have the problem that I'm not using tabs in my products tpl so it wont show up... any ideas? how can I modify this to work?
http://editorialrm.com/2010/product.php?id_product=46
Right now the one working is the one that calls the products in same category but I need to show them by tags.

Thanks!

S.

Share this post


Link to post
Share on other sites

This is a Brilliant Module in theory. Thank for all the good work. I really like where this is going.

I would just like to make a suggestion to make the module complete - perhaps someone has already done this?


How could you limit the number of results that are displayed? - if for example 50 products share the same tag then the module, as it is in it's current form, bombards the page with 50 products - is there a way to limit this to say 3 related products?


Maybe a loop should be added somewhere to make this happen a defined number of times? My programming skills are limited hence I am not sure where to start. I look forward to suggestions.


Otherwise this is a great module! Keep up the good work! :o)

Share this post


Link to post
Share on other sites

Hi CYTech!
First of all thank you to share your module, it helps me a lot. I was wondering how you would do to get the rewrited URL on the related product, right now it is like www.shop.com?product=... I have done something which work on my shop. I have edited the .php file and use the rewrite link (the one you call in the link rewrite image function) and add the product id and the ".html" at the end. But I am sure that it is not the right way to do it. If someone needs it I can post my code. Thanks in advance!

Share this post


Link to post
Share on other sites

Good Morning All,

I haven't been around in a long time due to being slammed with work and life, however I wanted to give an update on this module. I am updating it to work with the latest version of PrestaShop as well as coming out with a newer version to provide greater customization. I will update this thread again when the new version is available. Happy Coding! :)

Share this post


Link to post
Share on other sites

Thanks for the module is realemte good.
I have just one question.
I can show the category to which the product? I think this would be helpful for everyone …

thanks!

Share this post


Link to post
Share on other sites

Thanks CYTechnologies!
Then wait for your answer...!

Share this post


Link to post
Share on other sites

Hey 24,

Just letting you know I'm still working on an update for you, I noticed a better way of accomplishing the look up so I am updating that as well. Will upload something shortly. :-)

Share this post


Link to post
Share on other sites

Hi 24,

Attached to this reply is a new version of the module for you to test, let me know if it works well for you.

If it does I will update the main release to include this update.

To install - first remove the CY Related Products module from your store, then re-install the new version. :-)

cyrelated_products_cats_version.zip

Share this post


Link to post
Share on other sites

CYTechnologies, I believe that the module now works perfectly.
I tried it on my test store and had no problems to make it work.

I really appreciate it and this new version of your module is going to provide a lot of things at all!

Thank you very much for everything!

Until next time

Sorry for my English, I speak Spanish ; )

Share this post


Link to post
Share on other sites
Hi 24,

Attached to this reply is a new version of the module for you to test, let me know if it works well for you.

If it does I will update the main release to include this update.

To install - first remove the CY Related Products module from your store, then re-install the new version. :-)




Cy, will this new ver work with PS 1.2.5?


Regards,

Share this post


Link to post
Share on other sites

Mandrin, I have it running on Version 1.3.5.0

Share this post


Link to post
Share on other sites

Hi there,

I will definitely give it a bash tomorrow as it's bed time for me now :)

Thanks as always CY

Share this post


Link to post
Share on other sites

Hello CY! I love this module, it works beautifully on my website. I was able to customize it very nicely to suit my product page. However, do you think you can help with a small problem? Other people are wondering the same thing: how do you limit the number of related products showing?
Thanks and I look forward to your response!

Share this post


Link to post
Share on other sites

Hello Tinyhands,

I'm very glad you like the module :)

Give this a try.

1. ADD this code:

$cy_related_products = array_slice($cy_related_products, 0, 3);



2. BEFORE this code:

$smarty->assign('cyRelatedProducts', $cy_related_products);
return $this->display(__FILE__, 'cyrelatedproducts.tpl');



This can be found in the file cyrelatedproducts/cyrelatedproducts.php and it is around line 106.

Change the 3 to any limit you want, let me know! :)

Share this post


Link to post
Share on other sites

CY, thank you so much! That worked like a charm :) I hope this little block of code can help others with the same inquiry. Thanks again!

Share this post


Link to post
Share on other sites

Hello!
Thanks to Aaron for developing this module, it's fantastic! :-)
I have updated it to work with Prestashop 1.4, and I also have added a parameter to control the max number of items showed. I hope you'll find it useful!

Cheers!

¡Hola!

Muchas gracias a Aaron por desarrollar este módulo, ¡es fantástico! :-)
Lo he actualizado para que funcione con Prestashop 1.4 y he añadido un parámetro para controlar el número máximo de elementos que se muestran. ¡Espero que os resulte útil!

¡Saludos!

cyrelatedproducts.zip

  • Like 2

Share this post


Link to post
Share on other sites

Hey Midiman,

Thank you for the updates to the module, I will check it out and if all is well put it up for download on my site. (Will give credit of course :) )

Lm59 - you might want to add a clear to the 'layout' since it looks like the items are floating left.

You can use:
after the items loop to see if that helps at all. :)

Share this post


Link to post
Share on other sites

Hello!

I've been asked if it is possible to put this module in another hook. You can do it just adding the following code in cyrelatedproducts.php:

  public function hookProductFooter($params){
  return $this->hookProductTabContent($params);
}


You can use hookProductFooter or the hook you like. After adding the code, you shoul go to admin->modules->positions and set the module to appear in the position you like (ProductFooter in this example), and you also have to delete the module from the ProductTab and ProductTabContent hooks. They are hidden hooks, so you should check the "Show hidden hooks" before...

Hope this helps! (and sorry for my terrible english :))

hola!

Me han preguntado por email si es posible poner este módulo en otra posición. Para ello sólo hay que añadir el siguiente código en cyrelatedproducts.php:

  public function hookProductFooter($params){
  return $this->hookProductTabContent($params);
}


Puedes utilizar hookProductFooter o cualquier otro que prefieras. Después de añadir el código, debes ir a administracion->módulos->posiciones y activar el múdulo en el nuevo hook, así como desactivarlo en los hooks ProductTab y ProductTabContent. Estos hooks están ocultos, así que no olvides seleccionar primero la opción "Mostrar los hook invisbles"

Espero que os sirva! :)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks midiman, it works great!!
Thanks a lot!!

If you put a scroll buttons with more products like http://www.vistoenpantalla.com/camiseta_nino_bart_monopatin-ref_20169.html it will be a perfect module.

---------------------------

Gracias midiman, funciona perfecto!!
Muchisimas gracias!!

Si pones unos botones de scroll para poder poner mas productos como se puede ver en: http://www.vistoenpantalla.com/camiseta_nino_bart_monopatin-ref_20169.html será el módulo perfecto.

Share this post


Link to post
Share on other sites

Thanks!
I think it's a good idea from ojosdehumanoide, but I don't need that fucntionality now and I haven't got enoght time to develop it, sorry :)
ojosdehumanoide has found a little error in cyrelatedproducts.php: the assingnment of the default value for the number of items to show shouldn't be placed in the __construct() function, but in the install() one. I attach the new cyrelatedproducts.php with both changes for the laziest ones :P


Gracias!
Creo que es una buena idea por parte de ojosdehumanoide, pero en este momento no necesito esa funcionalidad y no dispongo de tiempo para desarrollarla, lo siento :)
ojosdehumanoide me señalo ayer que había un pequeño fallo en cyrelatedproducts.php: la asignación del valor por defecto del número de elementos que se mostrarán no debe estar en la función __construct(), sino en install(). Adjunto el nuevo archivo cyrelatedproducts.php con los dos ultimos cambios para los más perezosos :P

Saludos!

cyrelatedproducts.php

Share this post


Link to post
Share on other sites

Thanks midiman for both fixes(and for the lazy ones php ;-) ) and thanks to cytechnologies for this great module.

Cytechnologies, do You think that is possible the change i've said?? I think that changes will make a better module for all prestashop community.

Thanks again!!

----------------------------

Gracias midiman por ambos cambios (y por la versión para vagos ;-)) y gracias a cytechnologies por este gran módulo.

Cytechnologies, crees que es posible realizar los cambios que dije?? Creo que estos cambios harán un mejor módulo para la comunidad prestashopera.

Gracias de nuevo!!

Share this post


Link to post
Share on other sites

Morning,

Oh yes it is possible - just a matter of finding the time to do it. ;)

I have 4 projects launching on the 1st of April, my time is swamped at the moment sorry to say. As soon as it frees up though I will definitely put it into motion.

Share this post


Link to post
Share on other sites

Hi!!

There's a way to make an easy random of the products matches by tag??

Thanks a lot...

-----------

Hola!!

Hay alguna manera de hacer un random facil de los productos mostrados por etiqueta??

Muchas gracias...

  • Like 1

Share this post


Link to post
Share on other sites

Hi there

Great module, used it a few times on 1.3

Does this module work ok on 1.4 as having problems with it?

Thanks

David

Share this post


Link to post
Share on other sites

Hello,

This module does work on 1.4, look at the posts above I believe there was a patch added.

To add the products simply add 'tags' to the products when you add them, if a tag matches it will pull / display the product. :)

  • Like 1

Share this post


Link to post
Share on other sites

Hi, thanks for this module
If possible, how do I add a button "show all" that lists all Products with this tag?

Share this post


Link to post
Share on other sites

Hello,

If you are using the module midiman I believe he added a limit box in the configuration, my suggestion would be put 1000 to show them all. :D

However, if you only want to show say 10 and have a link that opens a new page, you could possibly adjust the module to show a link for the first tag that directs the user to a search page?

To answer your question, there is no show all currently on the module. If I get some time I can try and add one.

Share this post


Link to post
Share on other sites

thank you for your reply, as you say, I'm using the midiman's version for ps 1.4, but I want to use a search page for show all products.
I tried to add in cyrelatedproducts.tpl :

getPageLink('search.php')}?tag={$tag.name|urlencode}" title="View {$tag.name|htmlspecialchars}">Show all


but that does not work...
do you have an idea?

Share this post


Link to post
Share on other sites

I don't know how useful this would be for other people, but I would love to see a function that displays the related products in random order!

Share this post


Link to post
Share on other sites

Hi

Is there some way you can put related products just in one direction? I have a product I would like it to appear in almost 100 products, the problem is that if I see that product the 100 products will appear as related products.

Thanks
Gonzalo

Share this post


Link to post
Share on other sites

This is great and just what I was looking for. Works perfect on Presta 1.4.x
Thank you so much

Share this post


Link to post
Share on other sites

Hi,

First of all, it's really a great and very useful module. Thanks to all the developers. I have a question about it:

I installed the scrolled version of cyrelatedproducts and the list appears in a tab next to the "data sheet" tab. The customer has to click the tab to see the r.products list. But i want the customer to see the related products directly (not in a tab) below the viewed product and he/she be able to "add to cart" the related product. The related products will be listed like in a "category". I'll try to attach two screenshots below to express myself clearly :). How can make that happen?

49128_f42fbNDVUb3EUVXR35rc_t

49129_lYjBm0pNNLT14UkTRvVA_t

Share this post


Link to post
Share on other sites

@finlander,

Thanks for your reply very much. I did a little search on "associated products modules" but couldn't find any satisfying solutions. I've found only one "paid" module similar to cyrelatedproducts but it's not better than cy's. If anyone has a solution about what I need, please don't hesitate to PM me. This is an example of what I exactly need.

Share this post


Link to post
Share on other sites

I am running PS 1.2.5 and am using one of the early versions of this module... I would like some help oh how to set the displayed thumbnail text to "Overflow Hidden"

Share this post


Link to post
Share on other sites

Doesn't work with 1.4 :(

 

Always shows "There are no related products at this time."

Share this post


Link to post
Share on other sites

@finlander

 

Just downloaded your modified version and it works like charm!!!! Thank you so much! :)

Although the price is not showing up....

Share this post


Link to post
Share on other sites

Great module! Good for cross-selling! :) Thanks CYTechnologies.

 

Was wondering if it's possible to put the related products in rows instead of having to scroll through the different products.

Share this post


Link to post
Share on other sites

Hi,

This module (+scroll format) seems very cool but after installation,

i always have the same message : "There are no related products at this time."

I created some tags... nothing.

Anyone have an idea ?

I search actively, but i'm not an expert with Prestashop.

Thanks,

Fabien

Share this post


Link to post
Share on other sites

Thanks Finlander,

Of course :D, i've putted some identical tags in two products (one tag by product for the test), my cache is turn off and force compile is enabled.

I work with the PS 1.4.4.1.

Share this post


Link to post
Share on other sites

So... I've copied the files .tpl and .css in my theme repertory (for test and modify),

I don't know if it's linked and I don't know why, related products are emerged...

Sorry. It seems Worked fine ! Thanks for your attention.

 

Fabien

 

EDIT : work too with multiple tags.

Share this post


Link to post
Share on other sites

Hi Finlander,

 

Is it possible to have the related products in rows instead of having to scroll right or left to see each product?

Share this post


Link to post
Share on other sites

Thanks for getting back to me promptly Finlander.

 

By original module do you mean 'Product Category' ? It's not like the modification you made where it offers a Related Product Tab, and how it uses identical tags to pop-up.

 

With your version did you run into the problem where the last product with the slider is cut off half-way?

Share this post


Link to post
Share on other sites

I have tried with some versions of the module (from this forum thread) but I do not get it installed.

I'm using PS 1.4.4.1.

Once uncompressed on the /modules folder I go to the Modules pages on the BO but I can not see it on the modules list (with all tabs expanded, of course).

For some reason, PS seems to recognize it in some way, because the config.xml appears (if i delete it manually and reload the modules list page, it is re-created).

 

One thing I've seen inside the.php file is the tab on the BO is assigned with:

$this->tab = "Products";

 

and other modules I have installed checks the PS version to do that:

if(version_compare(_PS_VERSION_, '1.4.0.0') >= 0)

$this->tab = 'front_office_features';

else

$this->tab = 'Products';

I have tried to change this, but with no luck.

I am the only one with this problem??

There is another related products (by tag or whatever) module??

 

Thank you in advance

Share this post


Link to post
Share on other sites

Hi guys!

 

I'm developer and new to prestashop platform.

 

I was running into with the same problem in Prestashop 1.4.6.2, "there are no related...". After some debugging and struggling with the lack of API documentation i've found a fix.

 

1. Open module file cyrelatedproducts.php

2. Update on line 57 to.

 

$product = new Product($id_product,true);

 

As you will see, there is a second argument which should be TRUE.

 

Cheers!

Share this post


Link to post
Share on other sites

hy bmxer and finlander , i am using presta 1.4.6.2 and after I did what bmxer said cause i had the "there are no related..." it shows the products but no picture just some text and an error:

Strict Standards: Non-static method LinkCore::getProductLink() should not be called statically, assuming $this from incompatible context in C:\xampp\htdocs\presta\modules\cyrelatedproducts\cyrelatedproducts.php on line 78

i will also post a print screen so you understand better .

 

ALSO i get this instead of the images

<img width="80" height="80" src="<br /> <b>Notice</b>: Undefined index: images in <b>C:\xampp\htdocs\presta\tools\smarty\compile\97401e53f0e01f42dd08fc212bceb14f71d306dd.file.cyrelatedproducts.tpl.php</b> on line <b>32</b><br /> http://localhost/presta/img/p/5-13-medium.jpg">

If i turn off error display all work another question is how do i limit de number to 5 for example of displayed items

pict1u.gif

 

Uploaded with ImageShack.us

Share this post


Link to post
Share on other sites

salut,

 

tres interressé par ce module !

QQ à du nouveau dessus ???

Share this post


Link to post
Share on other sites

Installed this module on PS 1.4.7.3 and working fine. But i would like to change the following:

 

Related products show up under a tab. I would like to see them directly, not under a tab, e.g. over the tabs area. Any idea if that's easily done...?

  • Like 1

Share this post


Link to post
Share on other sites

Thank you for this module. I found it very helpful !!

Share this post


Link to post
Share on other sites

Hey! I installed the module and it doesn't show any related products. I've tried to debug and it seems it doesn't extracts any tags for the product to find similars.

 

$product_tags = $product->tags;

is an empty array although there are tags for the product. I have Prestashop 1.4.3

Share this post


Link to post
Share on other sites

I fixed it:

$product_tags = Tag::getProductTags($id_product);

Share this post


Link to post
Share on other sites

I fixed it:

$product_tags = Tag::getProductTags($id_product);

 

hey websku, i have changed that code accordingly but it leads to a server error when i try to load my page, any help ? thanks !

am using the newest version of prestashop, 1.5.1

  • Like 1

Share this post


Link to post
Share on other sites

How to display random related products:

I am not a PHP expert, just press random keys in random places and got it working

overwrite existing cyrelatedproducts.php

or edit it:

in line 125 & 126

$cy_related_products = array_slice($cy_related_products, 0, (int)(Configuration::get('NUM_REL_PRODS')));
$smarty->assign('cyRelatedProducts', $cy_related_products);

 

change it to:

$cy_related_products = array_slice($cy_related_products, 0, (int)(Configuration::get('NUM_REL_PRODS')));
if ($cy_related_products) {
shuffle($cy_related_products);
array_splice($cy_related_products, ($nb ? $nb : 10));
}
$smarty->assign('cyRelatedProducts', $cy_related_products);

cyrelatedproducts.php

Share this post


Link to post
Share on other sites

hey websku, i have changed that code accordingly but it leads to a server error when i try to load my page, any help ? thanks !

am using the newest version of prestashop, 1.5.1

 

I am having exactly the same problem. Has anybody found a fix for this yet?

 

Thanks in advanced.

Share this post


Link to post
Share on other sites

In PS 1.5.1 this module doesn't work, always says "There are no related products at this time.".

 

Also tried the patches of Midiman and Finlander, but no luck. Always the message that aren't related products.

Share this post


Link to post
Share on other sites

How can i limit the related product to show? In some product page it show more that 30 related products, i want to limit it to 8/10 not more.

Share this post


Link to post
Share on other sites

Hi CYTechnologies, i notice only now that you have already posted (with post #30 on page 2) the solution to that problem, thanks, you're a genius! ;)

Now I have to ask you a bit more, I see on my site that products with similar tag that have the same related products always show the same first 5.

I try to explain, some of my products have 30 related, the problem is that limiting them only to 4-5 or 6, every time it shows the same 5. It isn't possible to show 5 of that 30 at random, every time a visitor open the page?

Share this post


Link to post
Share on other sites

thanks for sharing this module, but unfortunately not compatible with ps 1.5.3.1 :)

Share this post


Link to post
Share on other sites

for 1.5.3.1 haven't tested it on earlier version

 

cyrelatedproducts.php

 

 

<?php
/**
* Related Products Module
*
* This module will remove the tags from a selected product and search for other products
* that share the same tags.
*
* @ver		 0.1
* @author	  Aaron Connelly - CYTechnologies
*
* Learn more at wwww.cytech-services.com - Happy coding!
*/

error_reporting(E_ALL ^ E_NOTICE);

class CyRelatedProducts extends Module
{
 function __construct()
 {
$this->name = 'cyrelatedproducts';
$this->version = '0.1';
$this->tab = 'Products';

 parent::__construct();

 $this->displayName = $this->l('CY - Related Products');
 $this->description = $this->l('Display related products based on the selected products tags.');
 }
function install()
{
  if (!parent::install())
  return false;
 if(!$this->registerHook('productTab'))
  return false;
 if(!$this->registerHook('productTabContent'))
  return false;
 return true;
}
public function hookProductTab($params)
{
 global $smarty;
 return ($this->display(__FILE__, 'cyrelatedproducts_tab.tpl'));
}
public function hookProductTabContent($params)
{
 global $smarty, $cookie;
 // final array
 $cy_related_products = array();
 // grab the product id
 $id_product = intval(Tools::getValue('id_product'));

 $product = new Product($id_product);

 // grab tags from the product
  $productTags = Tag::getProductTags($id_product);
  $productTags = $productTags[intval($cookie->id_lang)];


 // loop through the tags and see what we can find.

 foreach($productTags as $tag_key => $tag_value)
 {

  // new tag
  $tag_generic = new Tag('', $tag_value, intval($cookie->id_lang));

  // what other products match this tag... hand them over!
  $other_products = $tag_generic->getProducts(true); // grab products associated with this tag

  foreach($other_products as $other_key=>$other_value)
  {

// make sure theres no duplicate products
if($other_value['id_product'] != $id_product && !array_key_exists($other_value['id_product'], $cy_related_products))
{
 // grab product link
 $link = new Link();
 $other_value['link'] = $link->getProductLink($other_value['id_product']);
 //$other_value['link'] = Link::getProductLink($other_value['id_product']);

 // grab product image - request by user.
  $other_value['image'] = Image::getCover($other_value['id_product']);

 if(is_array($other_value['image']))
 {

  $other_value['image']['id_image'] = $other_value['id_product'].'-'.$other_value['image']['id_image'];
  $other_value['image']['link_rewrite'] = $this->cyLinkRewrite($other_value['id_product'], $cookie->id_lang);
 }
 // add the product to the array
 $cy_related_products[$other_value['id_product']] = $other_value;
}
  }
 }

 $smarty->assign('cyRelatedProducts', $cy_related_products);
 return $this->display(__FILE__, 'cyrelatedproducts.tpl');
}
/**
 * cyLinkRewrite
 * Retreive the rewrite for the given product
 *
 * @param  $id_product integer
 * @param  $id_lang	integer
 * @return $rewrite	string
 */
public function cyLinkRewrite($id_product, $id_lang)
{
  $result = Db::getInstance()->ExecuteS('SELECT `link_rewrite`
		FROM `'._DB_PREFIX_.'product_lang`
		WHERE `id_product`='.intval($id_product).' AND `id_lang` = '.intval($id_lang));
  return $result[0]['link_rewrite'];
}
}
?>

 

cyrelatedproducts.tpl

<div id="more_info_tabs" class="idTabs idTabsShort clearfix">
<a class="idTabHrefShort selected" href="#idTab5">{l s="We recommend"}</a>
</div>
<div id="idTabCY">
{if count($cyRelatedProducts) > 0}
 {foreach from=$cyRelatedProducts item=cyRelatedProduct}

  <div class="block" style="float: left;width: 120px;margin-right: 20px;">
  {if $cyRelatedProduct.image.id_image ne ""}
<a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}">
 <img src="{$link->getImageLink($cyRelatedProduct.image.link_rewrite, $cyRelatedProduct.image.id_image, 'medium_default')}" height="80" width="80">
</a>
  {else}
<a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}"><img src="{$img_prod_dir}{$lang_iso}-default-medium.jpg" alt="" height="80" width="80" title="{$cyRelatedProduct.name|escape:'htmlall':'UTF-8'}" /></a>
  {/if}
  <br />
  <a href="{$cyRelatedProduct.link}" title="View {$cyRelatedProduct.name|htmlspecialchars}">{$cyRelatedProduct.name|htmlspecialchars} <img alt=">>" src="{$img_dir}bullet.gif" border=0/></a>
  </div>
 {/foreach}
{else}
 <center><b>{l s='There are no related products at this time.' mod='cyrelatedproducts'}</b></center>
{/if}
<div class="clear"></div>
</div>
<div class="clear"></div>

 

Cheers

Edited by razvypp (see edit history)

Share this post


Link to post
Share on other sites

Installed this module on PS 1.4.7.3 and working fine. But i would like to change the following:

 

Related products show up under a tab. I would like to see them directly, not under a tab, e.g. over the tabs area. Any idea if that's easily done...?

 

Yes, today's norm is to display the Related products on the product page without clicking on a tab. Please give us the code.

Share this post


Link to post
Share on other sites

nice idea but i get a "FATAL ERROR" when trying to install on 1.5.3.1.

 

any fix for this?

 

 

thanks,

jer...

  • Like 1

Share this post


Link to post
Share on other sites

I try to explain, some of my products have 30 related, the problem is that limiting them only to 4-5 or 6, every time it shows the same 5. It isn't possible to show 5 of that 30 at random, every time a visitor open the page?

 

No one know how to do this?

Share this post


Link to post
Share on other sites

No one know how to do this?

 

Please read #87

Share this post


Link to post
Share on other sites

Thanks lain, but i have a difference in my file because i show only 5 products:

$cy_related_products = array_slice($cy_related_products, 0, 5);

Instead of:

$cy_related_products = array_slice($cy_related_products, 0, (int)(Configuration::get('NUM_REL_PRODS')));

 

So I used this lines of code:

 

$cy_related_products = array_slice($cy_related_products, 0, 5);
if ($cy_related_products) {
shuffle($cy_related_products);
array_splice($cy_related_products, ($nb ? $nb : 10));
}
$smarty->assign('cyRelatedProducts', $cy_related_products);

 

The problem is that in this way it shuffle the products but it always show the same 5 but in different position.

Edited by DARKF3D3 (see edit history)

Share this post


Link to post
Share on other sites

this module needs a LOT of improvement.

i had to stop using it since it always showed the same recommended items every time one went to check out, no way to show the ones i wanted.

 

it even showed products that were already in the shopping cart :(

 

it is a good idea but needs work, nice start and free too so can't complain.

 

jer...

Share this post


Link to post
Share on other sites