Jump to content

Featured Product / {RANDOM_PROD}


Guest tuffdude

Recommended Posts

Guest tuffdude

This probably has been covered before, but I'm not seeing it.

Why does the {RANDOM_PROD} show on all the pages except

Sale Items. The site has been in the making for awhile maybe I did

it in my many changes ???? So how do I get it to display on the Sale Items page also

so my side boxes look even? Thanks :(

My website: www.80s Eruption.com

Link to comment
Share on other sites

Guest tuffdude

They look fine to me on your site, so not sure which box you aren't seeing?

The box that says 'FEATURED PRODUCT' which is {RANDOM_PROD} in code.

Click the "SALE ITEMS' page it never shows up ??? :(

So it throws that side out of balance a little. But I do

believe it's been like that from install, and not something

I've changed. But not 100% positive.

I'm gonna clear my cookies, and check again.

Link to comment
Share on other sites

In looking at the code, I've come to this conclusion - and hopefully, I'm right.:

The randomProd code checks for the presence of a Category ID passed in the URL (and if you are looking at a specific category page, there will be a Category ID number - or "saleItems" - in the URL). The code uses this Category ID number to filter for only products in this category.

However, the Inventory table stores the product's real Cat ID code and not (never?) the word "saleItems". Therefore, the SQL query will always return zero records while looking at the special category page of "Sale Items".

And for zero records returned, the code sends a zero-length string instead of all the HTML necessary to render a Featured Items box.

To change this behavior:

In includes\boxes\randomProd.inc.php at about line 38, change:

if(isset($_GET['catId'])){

to:

if(isset($_GET['catId']) && $_GET['catId']<>"saleItems"){

This will get a random product from all categories unless the catID matches a valid value in the Inventory table.

I have not tried this myself.

Link to comment
Share on other sites

Okay, still confused. I see 2 boxes on all pages of your site - one that says "Our favorites" which seams to be what you renamed the Featured Item box, and the popular products box that you have scrolling images mod in. Both appear to me on all pages (using Firefox).

And just an aside - why do you have have sponsored links in such a prominant position to take people away from your site? I would have popular products and your payment information above the links box.

Link to comment
Share on other sites

Guest tuffdude

Okay, still confused. I see 2 boxes on all pages of your site - one that says "Our favorites" which seams to be what you renamed the Featured Item box, and the popular products box that you have scrolling images mod in. Both appear to me on all pages (using Firefox).

And just an aside - why do you have have sponsored links in such a prominant position to take people away from your site? I would have popular products and your payment information above the links box.

Whoops, I'm sorry I removed the {Random_Prod} box because of the fact that it doesn't show on the Sale Items page.

When my one banner exchange guy chasethechuckwagon, gets me the right size banner I will move my bottom 2 boxes

above the Sponsored Links box, I think you're correct on that, it will look better. :) Thanks for the input.

Now I see that you are using the SEO mod. My comments above about the code may or may not still apply.

I did try that bit of code yesterday, and it didn't work, but Thank you!

Link to comment
Share on other sites

Guest tuffdude

Ok Mysty, I moved my boxes around, what do you think?. Somehow I now have a whole new problem. The

guy finally gave me the right size banner I wanted, but when I placed it in between the boxes, on FF it

adds the link all the way into the sales items box, but on IE it only alters that part a little. Here's the code

maybe someone can tell me what I donked up this time :) Thanks

My website, Chase the Chuckwagon Banner Link???!!

/skins/My Template/styleTemplates/global/index.tpl

  </td>

			<td style="padding: 0px 5px 0px 0px;">{PAGE_CONTENT}</td>

			<td width="175">

					{SHOPPING_CART}	

					{SLIDESHOW}

					<a href="http://www.chasethechuckwagon.com/"><img src="https://www.80seruption.com/images/uploads/chuckwagon_168.gif"  

					  style="padding-left:4px; padding-bottom:5px"border="0">

					{SALE_ITEMS}

					{MAIL_LIST}

					<div class="boxTitleRight">Search Site</div>

<div class="boxContentLeft">{SEARCH_FORM}

<border="0" >

</div>

<div class="boxFootRight">&nbsp;</div>

<border="0" >

				</td>

			 </tr>

		</table>

Link to comment
Share on other sites

Guest tuffdude

I got it :) It was missing the end tag </img></a>

so it should be:

  {SLIDESHOW}

<a href="http://www.chasethechuckwagon.com/"><img src="https://www.80seruption.com/images/uploads/chuckwagon_168.gif"  

style="padding-left:4px; padding-bottom:5px"border="0"></img></a>

   {SALE_ITEMS}

Link to comment
Share on other sites

Looks better. I never understood putting links to competitors sites on your site to begin with, but if you are going to do it, definitely make them below your info.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...