![]() |
Displaying in columns instead of rows
Might there be a way to display related products in a smiliar way to category pages?
For example, on my category pages I have thumbnails in 3 columns along with the name of the product. I'd like a similar layout for the related products. I don't really want the extra stuff (buy button, wishlist button, price, etc.) Just the thumbnail and product name, with each related product going in a new column, instead of below in the same column. Does that make sense? Has anyone done that? |
I'm trying to get this work on 4.0.1 but it gives me this error
I also changed this line: Code:
$product_links = (func_query$search_query = "select DISTINCT $sql_tbl[products].*, $sql_tbl[categories].category, $sql_tbl[pricing].price from $sql_tbl[products], $sql_tbl[pricing], $sql_tbl[categories], $sql_tbl[product_links] where ($sql_tbl[pricing].membership='') and ($sql_tbl[pricing].productid=$sql_tbl[products].productid) and ($sql_tbl[pricing].quantity=1) and ($sql_tbl[products].categoryid=$sql_tbl[categories].categoryid) and $sql_tbl[products].forsale='Y' and ($sql_tbl[products].productid=$sql_tbl[product_links].productid2) and ($sql_tbl[product_links].productid1='$productid') ORDER BY $sql_tbl[products].product"); to this: (from 4.0.1 version) Code:
$product_links = func_query("SELECT DISTINCT $sql_tbl[products].productid, $sql_tbl[products].product, $sql_tbl[products].productcode, MIN($sql_tbl[pricing].price) AS price FROM $sql_tbl[products], $sql_tbl[pricing], $sql_tbl[product_links] WHERE $sql_tbl[products].productid=$sql_tbl[product_links].productid2 AND $sql_tbl[product_links].productid1='$productid' AND $sql_tbl[pricing].productid=$sql_tbl[products].productid AND $sql_tbl[pricing].quantity=1 AND $sql_tbl[pricing].variantid = 0 AND ($sql_tbl[pricing].membership='$membership' OR $sql_tbl[pricing].membership='') AND $sql_tbl[products].forsale='Y' GROUP BY $sql_tbl[products].productid ORDER BY $sql_tbl[product_links].orderby, $sql_tbl[products].product"); |
ok ... i figured it out...
i took out these lines which were causing errors because i wasn't using any other language. Code:
if(is_array($product_links)){ |
Quote:
I have completed the quoted change and also deleted the section of code that was causing the sql errors in sarahnk's second posting. I am currently upgrading to 4.03 and when I look at my upsells, it shows items are out of stock. The real issue is there are 100 items in stock not zero! Is there anyone else out there that has tried this mod on 4.03 and discovered similar problems? I would really appreciate any help |
It doesn't appear to be working in 4.0.4 at all. Does anyone have any suggestions why not?
|
and if you want to just have a bullet point image with the link, simply edit related_products.tpl in /xcart/skin1/modules/Upselling_Products/ to be the following:
Code:
{* $Id: related_products.tpl,v 1.7 2003/11/26 10:27:05 mAKI Exp $ *} |
Quote:
Well i get the SQL error, but it works on 4.0.7. Its just the damn error. Its happening here for me: Code:
$product_links[$p_v][product_options] = array_pop(func_query_first("SELECT COUNT(*) FROM $sql_tbl[product_options] WHERE productid='".$p_k["productid"]."'")); error is: Code:
INVALID SQL: 1064 : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE productid='34'' at line 1 Any pros out there see what it is? |
Looks like it may not be picking up the database table name.
Try: Code:
$product_links[$p_v][product_options] = array_pop(func_query_first("SELECT COUNT(*) FROM xcart_product_options WHERE productid='".$p_k["productid"]."'")); |
Thanks AJ-UKRS, that was just what I needed. By the way, this is a great mod! In my case though AJ-UKRS idea was the solution. :D
|
How would i set this up to do columns?
Quote:
How can i get this to display in colums? Mabe 3 per column, and centered? |
All times are GMT -8. The time now is 12:42 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.