'Next' and 'Previous' product links

elvis's picture

I'd like to add links like 'next product' and 'previous product' on the product card. so the customer doesn't have to go back to product list after viewing each product and then click on the next product. Would be particulary nice if this comes with the option of displaying hte name of the next item as well like this:

<<< previous: Dell laptop next: Hewlett-Packard laptop >>>

If the item is the last one in this category, the next item is the first one from the next product group. If the customer is not interested in the contents of the next group he can see it from the link's name.


manual only!!!

maitis's picture

Unfortunatly its not possible to make automatically to make previous/next name link to products. This would need to be done manually by for example; using some open product field where you can place this next and previous link.

The way that this could be accomplished is by firstly, going to Products->Products and in each of the products go to Open Fields tab [ref:]
There enter the link to the desired next and previous fields lines available.

Now they are there, after this you can go into visual -> WWW-outlook ->Product Page and then to the Product card variable.

Were desired you could insert the link $product_file1$</font>
<a href="$product_open_field1$">next product</a>
<a href="$product_open_field2$">previous product</a>

for example.

As you may have a lot of products then maybe exporting database to csv making changes and then inserting back could be a speeder job.

Hope this helps,

Matthew 

 

So I did

elvis's picture

as suggested by Matthew. The only issue is that the first item has now link 'previous' and the last item has 'next' link and I can't figure out how to eliminate them. For some reason it takes front page url if not specified otherwise.

But here it is: http://www.outlet.ee/PublishedService?file=page&pageID=9&itemcode=C6X517

looks good!

maitis's picture

A bit of work but a nice feature when working, looks good!

Matthew 

It has some disadvantages too

elvis's picture

At first I thought that this is quite a good solution. Now when the product is sold out the link on the previous product points to the sold out product. The result is 'product/group not found' instead of the next product description.

Also the search. Let's say the search result is 5 items. when you open one and there is a link 'next', the visitor naturally presumes that the next one is gonna be next of the search results. But it is not as long it is a static link.

So I still suggest to add next/prev links to be generated automatically.

Thanks for observations and

teetj's picture

Thanks for observations and proposal.

-teet

RE 'product/group not found'

Don't set your product to hide when not in stock and add another script to display "Out of stock" text next to the "Add to cart" button.

See http://wosbee.com/node/738 for details on this coding.

Next & Previous links

Looks very good...how about looping the 1st item so it goes to last if previous is clicked...but I guess there would be no end and the customer could assume an unlimited amount of products, or you could use a little scripting...

<script type="text/javascript">
var ProductLink = "$product_open_field1$";
if (ProductLink!=""){
document.write ("<a href='$product_open_field1$'>next product</a>")
}
</script>

And...

<script type="text/javascript">
var ProductLink = "$product_open_field2$";
if (ProductLink!=""){
document.write ("<a href='$product_open_field2$'>next product</a>")
}
</script>