Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

bestseller side-box hack Rate Topic   - - - - -

 
  • nova3470
  • Junior Member
  • Members
  • Join Date: 25-Mar 06
  • 1 posts

Posted 20 November 2006 - 09:56 PM #21

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

 
  • EagleRose
  • Member
  • Members
  • Join Date: 21-Feb 07
  • 63 posts

Posted 09 March 2007 - 02:05 AM #22

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
Eagle Rose Lingerie
"Bringing Spice to Your Life"
www.eagleroselingerie.com

1.34 sp2

 
  • crisje
  • Member
  • Members
  • Join Date: 24-Mar 07
  • 49 posts

Posted 11 April 2007 - 09:41 AM #23

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


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

Plzzz help!
1.34SP3
The DildoMan
any ideas and some help are always welcome!

 
  • lastninja
  • Junior Member
  • Members
  • Join Date: 25-Apr 07
  • 25 posts

Posted 26 April 2007 - 10:31 PM #24

hi,

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

 
  • updateshop
  • Member
  • Members
  • Join Date: 23-Aug 06
  • 93 posts

Posted 07 June 2007 - 02:34 PM #25

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

Plzzz help!



Same here! no pics / File system 1.3.4 sp3

 
  • abinop
  • Member
  • Members
  • Join Date: 01-Apr 07
  • 57 posts

Posted 09 June 2007 - 08:57 AM #26

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<count($products); $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

 
  • zardos
  • Senior Member
  • Members
  • Join Date: 08-Feb 06
  • 1062 posts

Posted 09 June 2007 - 01:14 PM #27

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]

 
  • abinop
  • Member
  • Members
  • Join Date: 01-Apr 07
  • 57 posts

Posted 09 June 2007 - 01:59 PM #28

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<count($products); $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

 
  • zardos
  • Senior Member
  • Members
  • Join Date: 08-Feb 06
  • 1062 posts

Posted 09 June 2007 - 02:05 PM #29

Thank You Alexandros

Perfect, very well done m8

http://www.megapcs4u.co.uk/megapcs/

Regards,
John

 
  • Premier
  • Member
  • Members
  • Join Date: 23-May 07
  • 82 posts

Posted 18 June 2007 - 06:01 PM #30

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.

 
  • Premier
  • Member
  • Members
  • Join Date: 23-May 07
  • 82 posts

Posted 23 June 2007 - 11:06 PM #31

does anyone know?

 
  • abinop
  • Member
  • Members
  • Join Date: 01-Apr 07
  • 57 posts

Posted 24 June 2007 - 05:42 AM #32

does anyone know?


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

 
  • Premier
  • Member
  • Members
  • Join Date: 23-May 07
  • 82 posts

Posted 24 June 2007 - 07:48 AM #33

Thank you very much, it worked perfectly!

 
  • coder
  • Senior Member
  • Members
  • Join Date: 19-Jun 07
  • 411 posts

Posted 02 August 2007 - 05:45 PM #34

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?

CS-CART: version 4.9.1


 
  • coder
  • Senior Member
  • Members
  • Join Date: 19-Jun 07
  • 411 posts

Posted 07 August 2007 - 03:02 AM #35

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

CS-CART: version 4.9.1


 
  • jmonk
  • Junior Member
  • Members
  • Join Date: 17-Apr 07
  • 19 posts

Posted 25 September 2007 - 08:37 PM #36

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

on homepage will show ten products that part is ok :D , 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

Attached Files



 
  • paulesport
  • Senior Member
  • Members
  • Join Date: 23-Aug 07
  • 144 posts

Posted 09 October 2007 - 09:26 AM #37

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

 
  • zardos
  • Senior Member
  • Members
  • Join Date: 08-Feb 06
  • 1062 posts

Posted 09 October 2007 - 04:10 PM #38

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

 
  • paulesport
  • Senior Member
  • Members
  • Join Date: 23-Aug 07
  • 144 posts

Posted 09 October 2007 - 08:47 PM #39

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