| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Wish to link from product page to category page? | |||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() Hi,
For good link strategy would like to put the following links on the bottom of my product pages: - Link from product page back to its respective category page. E.g. ⌠Go from widget No 1 page (product) to widget page (category)■ The code can be put at the bottom of modules/upselling products/related products however; I have no idea what code to use. Any ideas please? For linking back to home page have used HTML but obviously Smarty will be required for the above link. The use of a ⌠go back■ button is not an alternative.
__________________
Gerard Version 4.1.8 Gold Linux Server Zeus Australia |
|||||||
#2
|
|||||||
|
|||||||
![]() Pepperlibido-
I am looking for a solution to this as well, and have had no luck.If anyone out there has a solution or a mod would love to know. Thanks Scott 4.18 Apache
__________________
scott v x cart version 4.1.8 (Unix) |
|||||||
#3
|
|||||||||
|
|||||||||
![]() Try adding this, it's untested but looks to be working. So you might want to polish it off...
{math assign="up_one" equation="x-2" x=$location|@count} <a href="{$location[$up_one].1|amp}">{$location[$up_one].0}</a> Hope this helps you somewhere.
__________________
Doms kube v4.1.9 |
|||||||||
#4
|
|||||||
|
|||||||
![]() kube, it works spot on. Thank you so much.
And for those that might be interested it is important for SEO purposes to have the following link structure. Linking down, link: - Home page to tier 2 pages (best to avoid linking your home page any deeper than tier 2 pages). Tier 2 pages to tier 3 pages Tier 3 pages to tier 4 pages (best to avoid going deeper then tier 3 if possible) Linking back up link: - Tier 2 pages to tier 1 (home) page Tier 3 pages to tier 1 and tier2 pages Tier 4 pages to tier 1 tier 2 and tier 3 pages Search engines very seldom go beyond tier 3 pages so it is best to avoid going deeper than tier 3 if possible, however definitely no deeper than tier 4. If possible it is best to place the links in the content (text) of the page otherwise just place them at the bottom of the page.
__________________
Gerard Version 4.1.8 Gold Linux Server Zeus Australia |
|||||||
#5
|
|||||||
|
|||||||
![]() HiKube,
Thanks for the code It worked great but really wanted to have a button on the site for ease of use so I did this in the skin1/customer/main/products.tpl I added the following <td> {include file="buttons/go_back.tpl" style="button"} </td> I added this new go back button right next to the add to cart and a wish-list button I have on this page. I have the three buttons lined up in a row the last one being the one that throws the visitor back to the category page. I placed the code ( shown above) right after this line {if ($login ne "" || $config.Wishlist.add2wl_unlogged_user eq 'Y') && $active_modules.Wishlist ne ""} {include file="customer/add2wl.tpl"} <td> </td> I just put this on now but seems to work perfectly. It lets me go from the product page back to the catalog page. Hopefully it lets me help someone else out and start to payback all the help I have gotten from these forums. Scott V
__________________
scott v x cart version 4.1.8 (Unix) |
|||||||
#6
|
|||||||||
|
|||||||||
![]() cool fotodog13 ;D
Just one note I had to add: the context of the button isn't really a go-back button. It actually goes up one level/category. So if you were to deliberately jump to a deeper levelled subcategory it will pick the subcategory above. Anyways, you probably already knew that (but had to state it just in case). It should work in most parts of the store if there are similar category structures in place via the location array. It appears to fail at the home page (or any top levels) which could be easily resolved by including the appropriate IF NOT statement.
__________________
Doms kube v4.1.9 |
|||||||||
#7
|
|||||||
|
|||||||
![]() yup - I go that
In my case I only need to go up one sub-category but seem what you mean- wroks ok for the application I have at hand but with a but more tweaking - as you have described it would be even better. Not a coder but will try to take a peek at this and adding that to the forums for others S 4.18
__________________
scott v x cart version 4.1.8 (Unix) |
|||||||
|
|||
X-Cart forums © 2001-2020
|