I’m using EE 1.7.1 (just because the web host only supports PHP 5.0)
I’m building a retail website with category pages and item detail page. However, on the item detail page, I’d like to add a sidebar of 3 random items from the rest of the catalog as a sort of “You might also be interested in…” feature.
My problem is that the random list will only ever show the same item being shown on the detail page. I’m pretty sure its because I’m trying to display from the same weblog and the same category, so the EE tags are the same within both the item display code and the random list display code.
So, I know what’s causing my problem, but my question is: Is there some way around this or am I trying to go about this all wrong?
Item display:
{exp:weblog:entries weblog="jewelry"}
{categories}
<a href="http://{path=products/}">{category_name}</a>
{/categories}
{ngen_field}
<h1>{title}</h1>
{item_description}
${price}
{/exp:weblog:entries}Random display code (on the same page):
{exp:weblog:entries weblog="jewelry" orderby="random" limit="3" }
{title}
{/exp:weblog:entries}