bestseller side-box hack

Hello,



I’m running CS-cart 1.3.4 and all my images are stored in the file system. I’ve downloaded the hack and installed the downloadable files succesfully but it does not show me the product images on the best seller module. The product descriptions scroll with an image next to it that says “no available image”



Can anyone share some light as to what I could have done wrong?



Thank you

Hi All,

I am trying to get this mod to work in my store. I followed all the instructions, but I have one problem. I do NOT have “product_image.tpl”. Thus the hack won’t work. Anyone have a copy that they are willing to share with me?



Running 1.34 sp2 Skin: New vision Red



Or does anyone have a work around for this mod?



Thanks

Eagle Rose

[quote name=‘nova3470’]Hello,



I’m running CS-cart 1.3.4 and all my images are stored in the file system. I’ve downloaded the hack and installed the downloadable files succesfully but it does not show me the product images on the best seller module. The product descriptions scroll with an image next to it that says “no available image”



Can anyone share some light as to what I could have done wrong?



Thank you[/QUOTE]



Same here … I run 1.34 Sp3 the script is working but No pics …



Plzzz help!

hi,



would you do same hack for recently viewed side-box? and scrolling right to left? thnx.

[quote name=‘crisje’]Same here … I run 1.34 Sp3 the script is working but No pics …



Plzzz help![/QUOTE]





Same here! no pics / File system 1.3.4 sp3

Hello to all,

I think I have the solution. Do the following:



On file /addons/bestsellers/func.php



replace last line


return $products;



with


$prod_with_images= array();
for ($it=0;$it $prod_tmp=fn_get_product_data($products[$it]["product_id"]);
array_push($prod_with_images,$prod_tmp);
}

return $prod_with_images;






Then on /skins/YOURSKIN/customer/addons/bestsellers/sidebox.tpl



replace the following 2 lines of code (lines 101-102)



{getimageid var=$product.product_id assign="tmp_images"}
{include file="common_templates/image.tpl" image_width=$thumb_width obj_id=$product.product_id images=$tmp_images object_type="$tmp_object_type"}




with


{include file="common_templates/image.tpl" image_width=$thumb_width obj_id=$product.product_id images=$product.main_pair object_type="$tmp_object_type"}





I’ll be waiting for your input



Regards,

Alexandros

Thanks Alexandros



Very close, it now shows images, but also gives this error.



[B]Warning[/B]: Missing argument 2 for fn_get_product_data() in [B]/home/megapcs4/public_html/megapcs/core/fn_catalog.php[/B] on line [B]65


[/B]

Sorry about that!



I am quoting the whole function here to replace the old one:


function fn_get_bestsellers($category_id)
{
global $db_tables, $cart_language, $settings, $auth;

$query = '1';
if (!empty($category_id)) {
$path = db_get_field("SELECT id_path FROM $db_tables[categories] WHERE category_id='$category_id'");
$category_ids = db_get_fields("SELECT category_id FROM $db_tables[categories] WHERE id_path LIKE '$path/%'");
$category_ids[] = $category_id;
$query .= " AND $db_tables[product_sales].category_id IN ('".implode("','", $category_ids)."')";
}

$limit = $settings['Modules']['bestsellers_opts']['bestsellers_limit'];

$products = db_get_array("SELECT $db_tables[product_descriptions].product_id, $db_tables[product_descriptions].product, SUM($db_tables[product_sales].amount) as amount FROM $db_tables[product_sales] LEFT JOIN $db_tables[product_descriptions] ON $db_tables[product_descriptions].product_id=$db_tables[product_sales].product_id AND $db_tables[product_descriptions].lang_code='$cart_language' INNER JOIN $db_tables[products] ON $db_tables[products].product_id=$db_tables[product_descriptions].product_id AND $db_tables[products].avail='Y' WHERE $query GROUP BY $db_tables[product_sales].product_id ORDER BY amount DESC, $db_tables[product_descriptions].product ASC LIMIT $limit");

$prod_with_images= array();
for ($it=0;$it $prod_tmp=fn_get_product_data($products[$it]["product_id"],$auth);
array_push($prod_with_images,$prod_tmp);
}

return $prod_with_images;
}




Please tell me if everything is ok now,

Alexandros

Thank You Alexandros



Perfect, very well done m8



[url]http://www.megapcs4u.co.uk/megapcs/[/url]



Regards,

John

How can I add numbers to the images? I would like to show the top 10 bestsellers on my site and want that items position in the bestsellers to show, for instance 1., 2., 3 etc.

does anyone know?

[quote name=‘Premier’]does anyone know?[/QUOTE]



On /skins/YOURSKIN/customer/addons/bestsellers/sidebox.tpl , on line 99 change


{foreach from=$bestsellers item=product}



to


{foreach from=$bestsellers item=product name=product}



Then add


{$smarty.foreach.product.index+1}.



3 lines below, before


{include file="common_templates/image.tpl" image_width=$thumb_width obj_id=$product.product_id images=$product.main_pair object_type="$tmp_object_type"}



Alexandros

Thank you very much, it worked perfectly!

How can we display in option 3 that if the description goes beyond x characters it show “…” so for example a description will look like



We are very pleased to announce that we are launching a new Search… for option3

TIA



update… the mod for nesest products has truncate options… tried changing



{$product.product}

with

{$product.product|truncate:$settings.Modules.newest_opts.newest_product_name_truncate:'...':true}




did not work?

Any suggestion to how can we truncate the product name…??

Hello Guys,



sorry for this, but i think is not working properly this mod, I’ve installed month ago and was ok, but I didn’t notice a strange behaviour until today… :frowning:



on homepage will show ten products that part is ok :smiley: , but if you go to any product, that mod won’t show ten product, it changes to few of them,



with the permission of zardos I will show the behaviour I’m talking about… Looking Zardos’s page (you have implemented basic new skins and looks fantastic…) under bestsellers appears with ten items… that part is ok.



See bestseller.jpg image



but if you select any product, for example, “NEC MultiSync LCD1915X 19”, under products details, if you look under bestseller sidebox will appear only one item…



see bestseller2.jpg image



going to another product, it shows just one item instead of ten items…



Abinop, did you noticed that behaviour on your tests?



thanks guys for making great job… :lol:



regards

bestseller2.jpg

bestseller.jpg

anyone know the fix for this Best Seller Hack for 1.3.5?

1.3.5 has has its own way for bestsellers, done through listmania and you can make it scroll.

Oh I didn’t realize that… Thanks! however, i do not like the scrolling, i like the rotating images…is this possible?