| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
#11
|
|||||||
|
|||||||
Re: free <PREV | NEXT> mod help
If you have one product in category then the next/prev will not be displayed.
Alex |
|||||||
#12
|
|||||||||
|
|||||||||
Re: free <PREV | NEXT> mod help
__________________
Tammy x-cart gold + 4.7.2 x-cart 5.2.10 |
|||||||||
#13
|
|||||||
|
|||||||
Re: free <PREV | NEXT> mod help
Hmm. I will need to rebuild this mod :O)
If you don't use memberships options in your store you can use this variant: $mem_list = func_query("SELECT pr.productid, pr.product FROM $sql_tbl[products_categories] AS cat, $sql_tbl[products] AS pr WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product"); Alex |
|||||||
#14
|
|||||||||
|
|||||||||
Re: free <PREV | NEXT> mod help
I've been looking for that kind of mod forever..
Now that i found it it's not working on my site... I'll be waiting....... Thanks anyway
__________________
Tammy x-cart gold + 4.7.2 x-cart 5.2.10 |
|||||||||
#15
|
|||||||
|
|||||||
Re: free <PREV | NEXT> mod help
It was easy.
In product.php change old code to this: // === Next - Previous products from xCartMod.com === $mem_list = func_query("SELECT pr.productid, pr.product, mem.membershipid FROM $sql_tbl[products_categories] AS cat, $sql_tbl[products] AS pr LEFT JOIN $sql_tbl[product_memberships] AS mem ON mem.productid = pr.productid WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product"); $list = array(); if (is_array($mem_list)) foreach($mem_list as $li) { if ($li["membershipid"] == $user_account["membershipid"] || $li["membershipid"] == 0 || $li["membershipid"] == "") $list[] = $li; } if (is_array($list)) foreach($list as $x=>$li) if ($li["productid"] == $productid) { // previous if ($list[$x-1]["productid"] != "") $prev = $list[$x-1]; else $prev = end($list); // next if ($list[$x+1]["productid"] != "") $next = $list[$x+1]; else $next = $list[0]; } $smarty->assign("next", $next); $smarty->assign("prev", $prev); // === Next - Previous products from xCartMod.com ==== Alex |
|||||||
#16
|
|||||||||
|
|||||||||
Re: free <PREV | NEXT> mod help
Don't know why
but it's not working. Tammy
__________________
Tammy x-cart gold + 4.7.2 x-cart 5.2.10 |
|||||||||
#17
|
|||||||
|
|||||||
Re: free <PREV | NEXT> mod help
Did you add this text in skin1/customer/main/product.tpl ?
{* === Next - Previous products from xCartMod.com === *} {include file="customer/next_prev.tpl"} {* === Next - Previous products from xCartMod.com === *} I don't see "<br><br>" it on your site. Alex |
|||||||
#18
|
|||||||||
|
|||||||||
Re: free <PREV | NEXT> mod help
I did add it
{* $Id: product.tpl,v 1.147.2.15 2007/05/11 08:00:26 max Exp $ *} {* === Next - Previous products from xCartMod.com === *} {include file="customer/next_prev.tpl"} {* === Next - Previous products from xCartMod.com === *} What you refer to <br><br/>?
__________________
Tammy x-cart gold + 4.7.2 x-cart 5.2.10 |
|||||||||
#19
|
|||||||
|
|||||||
Re: free <PREV | NEXT> mod help
Now I have no installed MySQL 5, so I cannot test it :O(
It's last version. Please, try. // === Next - Previous products from xCartMod.com === $mem_list = func_query("SELECT pr.productid, pr.product FROM $sql_tbl[products_categories] AS cat, $sql_tbl[products] AS pr WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product"); $list = array(); if (is_array($mem_list)) foreach($mem_list as $li) { $mem = func_query_first_cell("SELECT membershipid FROM $sql_tbl[product_memberships] WHERE productid = '$li[productid]'"); if ($mem == $user_account["membershipid"] || $mem == 0 || $mem == "") $list[] = $li; } if (is_array($list)) foreach($list as $x=>$li) if ($li["productid"] == $productid) { // previous if ($list[$x-1]["productid"] != "") $prev = $list[$x-1]; else $prev = end($list); // next if ($list[$x+1]["productid"] != "") $next = $list[$x+1]; else $next = $list[0]; } $smarty->assign("next", $next); $smarty->assign("prev", $prev); // === Next - Previous products from xCartMod.com ==== Alex |
|||||||
#20
|
|||||||||
|
|||||||||
Re: free <PREV | NEXT> mod help
No luck.
I'm trying to think maybe i did some mistake. checked it all again, and no. Tammy
__________________
Tammy x-cart gold + 4.7.2 x-cart 5.2.10 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|