Forums / Addon Sideboxes / Best Seller's Scrolling Images - support thread

Best Seller's Scrolling Images - support thread

Views: 24,800

Results 1 to 20 of 33
29 May 2011, 3:57 PM
#1
chaiavi avatar

chaiavi

New Zenner

Join Date:
Dec 2010
Posts:
51
Plugin Contributions:
0

Best Seller's Scrolling Images - support thread

This is the official support thread for the "Best Seller's Scrolling Images" plugin.

This plugin enables the following upgrades to the best seller's sidebox:

  • Added the image
  • Removed the numbering
  • Display of the product name is beside the image (and not under image)
  • Image display uses zen-cart image function (if you use Image Handler, it will be used here as well)
  • Product price displayed using a zen-cart function (will also show currency changes and specials pricing)

In a nutshell - it scrolls the best sellers and adds needed info (price) to the sidebox.

This plugin was designed to be simple and without any special JS or AJAX technology, it uses a simple marquee tag.

Links:
Author's page: http://zen-cart.co.il/bestsellers-scrolling-images/
Plugin on ZenCart: http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=1836

Example can be found here:
http://noajewelry.com/

Enjoy,
Chaiavi

1 Jun 2011, 10:11 PM
#2
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

I tried your nice module but no image is shown in the sidebox. Only the default : no_picture.gif !

What am i missing ? :blink:

2 Jun 2011, 8:41 AM
#4
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Yes, they do have images.

But something strange is happening.

I tried to debug the result of : tpl_best_sellers.php , by adding some echo commands :

echo 'imgLink : ' . $imgLink .'<br/>';	
echo "\n" ;
echo zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) .'<br/>';	
echo "\n" ;
echo zen_get_products_display_price($bestsellers_list[$i]['id']) .'<br/>'.'<br/>';	

and everything is OK, **except **the image file ! It only returns the default image folder ( i.e images/ )

You can seet the Results below :

imgLink : images/
http://example.com/store/index.php?main_page=product_info&products_id=191
€18,00

imgLink : images/
http://example.com/store/index.php?main_page=product_info&products_id=189
€13,60

imgLink : images/
http://example.com/store/index.php?main_page=product_info&products_id=181
€20,00

Any ideas ?

2 Jun 2011, 8:57 AM
#5
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Adding also this line :

 echo  'bestsellers_list['.$i.'][image] : ' .  $bestsellers_list[$i]['image'] ;

returns empty results ( ! ) :

bestsellers_list[1][image] :
bestsellers_list[2][image] :
bestsellers_list[3][image] :

2 Jun 2011, 9:14 AM
#6
chaiavi avatar

chaiavi

New Zenner

Join Date:
Dec 2010
Posts:
51
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Hi Takisd,

Please look at the other file you have in the bestseller package, it's in the modules directory.

Look at line #68 - that is the place where the image name is being populated.

Please debug that place and keep us posted.

BTW - good debugging work till now

2 Jun 2011, 9:24 AM
#7
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Chaivai , any ideas how to do it ? I'm new to zen cart & php . Thank you

2 Jun 2011, 10:22 AM
#8
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

This is what i found !

If i paste the code of best_sellers.php into one page i.e Page4, while viewing the page everything works PERFECT ( Inside the page - where a new box is displayed - and in the right side where the basic sidebox is ! ).

In all other pages the images are not displayed !

What am i missing ?

2 Jun 2011, 10:55 AM
#9
takisd avatar

takisd

New Zenner

Join Date:
Feb 2011
Posts:
8
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

takisd:

Chaivai , any ideas how to do it ? I'm new to zen cart & php . Thank you

I am sorry for the misspell of your name !

7 Jul 2011, 4:43 PM
#10
melirlbr avatar

melirlbr

New Zenner

Join Date:
Dec 2009
Posts:
25
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Thanks for this model.

Is it possible to remove the price from the product? to scroll just the product?

7 Jul 2011, 5:03 PM
#13
melirlbr avatar

melirlbr

New Zenner

Join Date:
Dec 2009
Posts:
25
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Thanks chaiavi for your quick reply. I've tried it and works wonderful.

My bestsellers are set to max 5, is this why after is finishes scrolling it becomes blank for a few seconds till it starts again scrolling?

Also is it possible to add a separator between the bestseller box products? i found a tread with the solution but only showing to me after first product.

link: http://www.zen-cart.com/forum/showthread.php?t=111763

7 Jul 2011, 6:25 PM
#15
melirlbr avatar

melirlbr

New Zenner

Join Date:
Dec 2009
Posts:
25
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Sorry but the <HR> didn't work and the whole sidebox disappeared

i added like this:

zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a><BR></td></tr>' . "\n";
<hr>
}
$content .= '</table></div>' . "\n";

7 Jul 2011, 9:33 PM
#17
melirlbr avatar

melirlbr

New Zenner

Join Date:
Dec 2009
Posts:
25
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Tried new solution but can't manage to make it work, but this mod is great anyway.

I also have another bestseller mod called "best sellers page" that's just a page to my bestsellers, i want to add this to your bestsellers scrolling sidebox with an 'more" link into the box heading, (because the scrolling shows only 5 products, i need customers to be able to search all bestsellers) how can this be done?

תודה רבה:clap:

7 Jul 2011, 10:08 PM
#18
chaiavi avatar

chaiavi

New Zenner

Join Date:
Dec 2010
Posts:
51
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Original code:
for ($i = 1; $i <= $total; $i++) {
$imgLink = DIR_WS_IMAGES . $bestsellers_list[$i]['image'];
if ($i == 2) {$content .= '';}
$content .= '<tr><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_image($imgLink, zen_trunc_string($bestsellers_list[$i]['name']), SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2) . '</a></td><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a><BR><div align=left>' . zen_get_products_display_price($bestsellers_list[$i]['id']) . '</div></td></tr>' . "\n";
}
$content .= '</table></div>' . "\n";

Altered code:
for ($i = 1; $i <= $total; $i++) {
$imgLink = DIR_WS_IMAGES . $bestsellers_list[$i]['image'];
if ($i == 2) {$content .= '';}
$content .= '<tr><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_image($imgLink, zen_trunc_string($bestsellers_list[$i]['name']), SMALL_IMAGE_WIDTH/2, SMALL_IMAGE_HEIGHT/2) . '</a></td><td valign=top><a href="' . zen_href_link(zen_get_info_page($bestsellers_list[$i]['id']), 'products_id=' . $bestsellers_list[$i]['id']) . '">' . zen_trunc_string($bestsellers_list[$i]['name'], BEST_SELLERS_TRUNCATE, BEST_SELLERS_TRUNCATE_MORE) . '</a><BR><div align=left>' . zen_get_products_display_price($bestsellers_list[$i]['id']) . '</div><hr></td></tr>' . "\n";
}
$content .= '</table></div>' . "<a href=http://example.com>More Bestsellers...</a>\n";

I have bolded out the changed code.

לילה טוב :smile:

8 Jul 2011, 4:06 PM
#19
melirlbr avatar

melirlbr

New Zenner

Join Date:
Dec 2009
Posts:
25
Plugin Contributions:
0

Re: Best Seller's Scrolling Images - support thread

Thanks so much chaiav it works like a charm.

Love you...