View Single Post
  #5  
Old 07-23-2008, 02:10 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Featured Products Slide Show Plugin

Marian,
Quote:
Originally Posted by scraps
I am trying to install this on my frontpage. I've installed it and got it working perfectly, however, is there no way it could just pick a random product instead of working off featured products?
Our module shows Featured products in order of array being retrieved from database. You can modify /modules/Featured_ISS/func.php to retrieve random products from database:

Old code:
Code:
if ($products = func_query("select p.productid, product, list_price, pr.price as price, i.id from $sql_tbl[products] p inner join $sql_tbl[featured_products] f on f.productid=p.productid inner join $sql_tbl[images_T] i on p.productid = i.id left join $sql_tbl[pricing] pr on pr.productid=p.productid where f.avail = 'Y' and f.categoryid = 0 and pr.variantid = 0;")) { foreach($products as $k => $v) { $fprod[$k][0] = $v['productid']; $fprod[$k][1] = $v['product']; $fprod[$k][2] = $v['price'] ? $v['price'] : $v['list_price']; $fprod[$k][3] = $v['id']; } }

New code:
Code:
if ($products = func_query("select p.productid, product, list_price, pr.price as price, i.id from $sql_tbl[products] p inner join $sql_tbl[images_T] i on p.productid = i.id left join $sql_tbl[pricing] pr on pr.productid=p.productid where p.forsale = 'Y' and p.avail > '0' and pr.variantid = 0;")) { shuffle($products); foreach($products as $k => $v) { $fprod[$k][0] = $v['productid']; $fprod[$k][1] = $v['product']; $fprod[$k][2] = $v['price'] ? $v['price'] : $v['list_price']; $fprod[$k][3] = $v['id']; } }

This code allows to select all available products instead of Featured Products.

Quote:
Originally Posted by scraps
I have telafirma's random featured product installed on my site, and that allows me to show featured products without having to check mark each product under categories. Could your mod not work in somewhat the same way?

I think I've answered in previous point.

Quote:
Originally Posted by scraps
The other thing, there is no configurations for this module in terms of image size. It works off from what I can gather the product image, and I'd rather it work off the thumbnail image, or allow us to "size" them in the configuration to an overall generic sizing, simply because with images that are of different sizings, the "text" also "bounces" when the image is changing. Allowing us to set a size range would eliminate the bouncing text.

Please find this row in /modules/Featured_ISS/featurediss.tpl

Code:
imgContainer.innerHTML = '<a id="rotator_url" onclick="javascript: window.location=\'product.php?productid='+aw_iss_data[0][0]+'\';"><img id="rotator" src="image.php?type=T&id=' + aw_iss_data[0][3] + '" /></a>';
and replace with
Code:
imgContainer.innerHTML = '<a id="rotator_url" onclick="javascript: window.location=\'product.php?productid='+aw_iss_data[0][0]+'\';"><img id="rotator" src="image.php?type=T&id=' + aw_iss_data[0][3] + '" width="100" /></a>';
You can change image size by adjusting 'width' parameter.

Quote:
Originally Posted by scraps
When I tried to customize the look, I got nowhere, because it's all in the tpl file and doesn't allow for customizing the overall look of the mod. (Let's say I want a background, no way to do that, that I could figure out anyway)

Why you can't customize the look if it's all in the tpl file? /skin1/modules/Featured_ISS/featurediss.tpl


Quote:
Originally Posted by scraps
I also think it would be better to call the script from a .js file instead of having the script load into the page, since this is known to be a faster method of loading a page.

It's impossible, because we need to use Smatry variables in Javascript which being parsed before loading, but JS file being loaded by browser only after main HTML is loaded.

Quote:
Originally Posted by scraps
Also, this addon disabled another javascript I have running in my header. It comes down to the /if statement. I realize it's needed, but how can I get around it disabling the header javascript. If I make a choice on which addon to keep, it's going to be the header over this script, because I like it better and it works without any problem involved, other than when I install this script.

Please provide more information on this.
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote