![]() |
list all products
Anyone know how to put an extra page in that lists all products from all categories?
Cheers |
Hey, that would be great! We could also use that to create a .PDF catalog of all our items. Hope somebody replies. :)
|
Hate to sound like an idiot, but can you be a bit more specific?
|
Quote:
Hi Boomer, I am building a shop and they require one page that lists all products, no matter what category the product is in. Ideally this would have a few other details as follows: SKU | Item Description | Category | Link to view | Add to Cart ?? I know someone did something like this for a printable product list but could find it on the forum. Thanks |
Here's my php code to create a product list.
I've made a seperate php file for this. But I don't know how to integrate it into the look and feel of X-cart.... Code:
<TABLE ALIGN=CENTER VALIGN=TOP WIDTH=100%> |
Thankyou.
I will be able to sort this now - cheers for the code. |
Sorted.
Had to create a new php file based upon home.php. I called it list_all.php Code:
<? This includes another file based upon products.php Code:
<? It also includes a template customer/list_all.tpl which is identical to home.tpl except that I hard coded the page title. customer/home_main.tpl was amended by adding: Code:
{elseif $main eq "listall"} and creating a template as customer/main/show_all.tpl This is effectively the original product listing in customer/main/product.tpl but I split it out so that I could show additional columns such as the category name and also to add the dialog box. I could be bothered to fully integrate this part. You will see what I mean when you run it. |
forgot to say that the file is called by going to yourdomain.com/total_list.php?main=listall
Also that I have sorted it by category name but this can be changed by amending the sql order by code in all_products.php. |
Wow Funkydunk.
You've completed the script. Now I'll try to implement it.... Cool :P |
cyberactive,
It doesnt split by category like your list did but it is integrated. :) |
I'm not a programmer, and I've tried the above code....
But I realy don't understand what to do and which files to create.... Please give me some more details on this.... |
ok here goes...
total_list.php in the customer directory (not under skin1) Code:
<? all_products.php in the same directory Code:
<? list_all.tpl in skin1/customer/ to: Code:
{* $Id: list_all.tpl,v 1.2.2.1 2002/10/03 10:21:19 zorg Exp $ *} and add the following code into home_main.tpl in skin1/customer above where it says: {else} {include file="common_templates.tpl"} {/if} Code:
{elseif $main eq "listall"} There is probably an easier way to do this but this worked for me. Enjoy :wink: |
Thanks for the quick reply.
Now something is happening:) Code:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 5 bytes) in /home/httpd/vhosts/computerzaak.net/httpdocs/include/func.php on line 26 Hmmm..... I called /total_list.php?main=listall |
I think that the products array is too big for it to handle.
Will have to have a rethink. :( |
Aha....:)
Well, it's about 800 products. Let's think about it. :( |
Would you not then need a template: customer/main/show_all.tpl ?
|
good spot Jon.
Just testing to see if anyone is reading the code :wink: Yes customer/main/show_all.tpl should be created aswell: I have extensively modified this but the basic template to use is products.tpl just I hard coded some of the dialog.tpl stuff Code:
{* $Id: show_all.tpl,v 1.16 2002/09/25 10:12:05 zorg Exp $ *} |
Would someone please post a link to such a page so I can see the end result?
Thank you, |
pm'd you with the link :D
|
Thank you! :)
|
Well, it took a bit of customizing but I was able to implement this very succesfully.
Check it out: http://www.boomboombap.com/shop/customer/total_list.php?main=listall Thanks much to FunkyDunk for this sweet mod ! |
Hmm... someone I showed this to immediately replied with " Man you need to add pagination "
Any idea how to implement this ? |
That wasn't the requirement that I was given for my client but the easiest thing to do is look at the exisitng products.php and adapt the coding in there.
May take some fiddling though. :wink: |
You could just use this:
http://www.boomboombap.com/shop/customer/search.php?substring= It is the search without a search term entered. In other words, what appears to be a bug, allowing you to enter a search without entering a term, turns out to be helpful, because it lists all products. ATKOgirl |
good point Atkogirl..blindingly obvious things are often missed looking for a solution. 8)
|
Yes, this is the simple method.
I like FunkyDunk's however because of the nice "add to cart" feature and the simply and concise display :) Im actually already using what you mention ATKOgirl with a button called "What's New" |
I have tried and tried and tried this code.....All I get is a blank screen at the /total_list.php?main=listall
It shows my site layout side menu and head. But noting in the center of page complety blank. Any thought! :lol: |
this is perfect.. how would i implement this listing format in the product listing file(products.tpl) instead of the style that displays all the pictures that is standard setup with x-cart. not to display everything but just that category
|
I am using this mod to create a page to be spidered by a product/price search engine and I am stuck.
The layout is simple and I have the display working perfect except for one thing. The problem is that I need to display the category name of the ROOT category. Right now I am getting the subdirectory displayed as Cat1/Cat2/Cat3. I just need Cat1. I am using {$products[product].category}. What SHOULD I be using to just get the root cat? Thanks in advance for assistance. I know this is simple, but I am totally confused. My show_all.tpl Code:
<table>{section name=product loop=$products} |
.
It looks good in boomboombap's site. Only think I would like to suggest is to open up new small window saying added to cart or showing the cart, instead of on main page, taking to cart once we add the product.
|
OK, I still need help. ^^^
Please. |
Bump for "I could really use some help please X-Pals".
Puleeze. see two posts back. |
This variable isn't available from the template without modifying func.php.
This can be done as follows (for 3.4 site) change func_search_products where it says: Code:
if ($current_area == "C" && $store_language != $config["default_customer_language"]) to Code:
if ($current_area == "C" && $store_language != $config["default_customer_language"]) the top level category will then be available as: {$products[product].maincat} in products.tpl hth |
Thank you FD. You are my hero! =D>
|
Glad it worked :)
|
This is a great mod, but how would we add a thumbnail picture?
Thanks! Quote:
|
Wonderful and much needed mod. Thank you much!
|
mod not working for me with 4.03
When i installed de mod and go to the following url
www.mydomain.com/customer/total_list.php?main=listall i get Not Found The requested URL /customer/index.php was not found on this server. that is correct because there is no index.php in customer. anyone know why it wants to go to index.php |
^ Your using x-cart 4, I believe this mod is for x-cart 3.
|
I used this I have x-cart 4
<FORM method="POST" action="search.php" name="showall"> <INPUT type="hidden" name="mode" value="search"> <INPUT type="hidden" name="posted_data[by_title]" value="Y"> <INPUT type="hidden" name="posted_data[by_shortdescr]" value="Y"> <INPUT type="hidden" name="posted_data[by_fulldescr]" value="Y"> <INPUT type="hidden" name="posted_data[substring]" size="16" value=""> Show all products{include file="buttons/search_head.tpl"} </FORM> I added it at the top of my site next to the drop down http://www.pixellab.biz |
All times are GMT -8. The time now is 07:02 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.