Closed (outdated)
Project:
Previous/Next API
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2010 at 12:32 UTC
Updated:
16 Oct 2022 at 16:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sahar999 commentedhi,
I'm not sure about your question but I think you can use the method in the module read me file.
first configure it in Administer › Site configuration >Prev/Next.
for product you can change the code in readme file like this.you can add a code to template.php file of your theme:
then copy node.tpl.php and rename it to node-product.tpl.php and add html code like this which is shown in readme file.
hope this helps,
Comment #2
mogop commentedIt is working with some products but not with all. And they are not in order.
I was looking for something like this:
if I have vocab Catalog:
Term 1
- Term 1.1
--product
- Term 1.2
--product
- Term 1.3
-- Term 1.3.1
---product
-- Term 1.3.2
---product
-- Term 1.3.3
---product
- Term 1.4
Term 2
- Term 2.1
-- Term 2.1.1
-- Term 2.1.2
- Term 2.2
- Term 2.3
... and so on...
Previous / Next should point to another products from the same term that is the present product, but instead of Previous / Next links to show prev and next product with Image and title
:)))))
sounds like a big request
Comment #3
sahar999 commentedI think you can start by changing the pn_node method. I changed it a little may be that helps. you may need to change the path.
Comment #4
mogop commentedI'm not sure how to set the image path but was something like this : sites/default/files/imagecache/product/[type]/[termpath-raw]/[nid] - but for termpath I use path auto and i18n module
and still the prev/next products are not from the same term is it possible to choice vocabulary/1/term/tid
I have 2 vocab : one for multiply tags and another for the Product Category.
Comment #5
sahar999 commentedI've modified the code of module in order to include taxonomy. you can make these changes to see if it solves the problem. I suggest you to make a backup first.this may not solve all of issues. please let me know if it works.
in prev_next.module file replace this function.
Comment #6
mogop commentedI have no idea of what is going wrong but now the block for prev/next is not showing...
Comment #7
sahar999 commentedmay be you need to re index the site in Administer › Site configuration >Prev/Next
Comment #8
mogop commentedMy indexing status was 0% before I run Cron, now it's 100% and the block is showing but in the links there is no space between the category name and the title of the product, look like this : "product category nametitle of a product"
In order to get the image of the product I change your code
from:
$html = '<img src="'.base_path().'sites/default/files/imagecache/product/' . $n_node->field_image_cache[0]['filename'];to:
$html = '<img src="'.base_path().'/' . $n_node->field_image_cache[0]['filepath'];which gives me the original image but it's not very good solution because the size of the file is very big instead I want to use image cache profile for that image but I don't know how to get the path.Is there any way to use File path tokens like these bellow? :
and still prev/next links sometimes are based on tags used for that product. they are not showing items of the same category as the current product. I use vocab/1/terms/category for product categories and vocab/3/terms/tags for tagging products
Comment #9
bhosmer commentedIs this still an issue for you? If so, feel free to reopen.
Comment #10
jcnventura