Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Add to cart button on product listing

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #31  
Old 06-22-2003, 01:47 AM
  DataViking's Avatar 
DataViking DataViking is offline
 

eXpert
  
Join Date: Jan 2003
Location: Las Vegas, NV
Posts: 361
 

Default

Thanks for the code, works great
Reply With Quote
  #32  
Old 06-23-2003, 12:01 PM
 
YuriC YuriC is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 66
 

Default How about this feature

http://www.worldhealthproducts.com/xcart-musclesoft/customer/home.php
Reply With Quote
  #33  
Old 06-23-2003, 04:54 PM
  DataViking's Avatar 
DataViking DataViking is offline
 

eXpert
  
Join Date: Jan 2003
Location: Las Vegas, NV
Posts: 361
 

Default YuriC

I like yours a lot. Is any chance that you will share the code?
Reply With Quote
  #34  
Old 06-24-2003, 02:20 PM
 
YuriC YuriC is offline
 

Advanced Member
  
Join Date: Mar 2003
Posts: 66
 

Default I dont see why not

Here you go. Replace your products.tpl with this code

Code:
{* $Id: products.tpl,v 1.21.2.2 2003/03/11 10:49:14 svowl Exp $ *} {* mod by YuriC *} {section name=product loop=$products} <table border=0 width=100%> <tr><td width=90 align=center valign=top> <a href=product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}>{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=70 product=$products[product].product} {$lng.lbl_see_details}</a> </td> <td valign=top> {$products[product].product}</font> <font size=1> {$products[product].descr|truncate:300:"...":true} </font> <hr size=1 noshade width=230 align=left> {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].price ne 0} {if $products[product].discount ne 0} <font class=MarketPrice>{$lng.lbl_market_price}: <s> {math equation="price/(1-(discount/100))" price=$products[product].price discount=$products[product].discount format="%d.00" assign=unformatted}{include file="currency.tpl" value=$unformatted} </s></font> {/if} <font class=ProductPrice>{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].price}</font><font class=MarketPrice>{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].price}</font>{if $products[product].discount ne 0}, save {$products[product].discount}%{/if}{if $config.General.use_vat eq "Y"}, {$lng.lbl_including_vat} {$products[product].vat}%{/if} {else} <font class=ProductPrice>{$lng.lbl_enter_your_price}</font> {/if} {/if} <form name="form{$products[product].productid}" method=post action="cart.php?mode=add"> {$lng.lbl_quantity}:{if $product.min_amount gt 1} <FONT class=ProductDetailsTitle>{$lng.txt_need_min_amount} {$product.min_amount} {$lng.lbl_items}</FONT>{/if} {if $config.General.show_in_stock eq "Y" and ($product.avail le 0 or $product.avail lt $product.min_amount)} {$lng.txt_out_of_stock} {else} {if $config.General.show_in_stock ne "Y"} {assign var="mq" value=$config.General.max_select_quantity} {else} {math equation="min(maxquantity+minamount, productquantity)+1" assign="mq" maxquantity=$config.General.max_select_quantity minamount=$product.min_amount productquantity=$product.avail} {/if} <input type=hidden name=mode value=add> {if $product.distribution eq ""} {if $product.min_amount le 1} {assign var="start_quantity" value=1} {else} {assign var="start_quantity" value=$product.min_amount} {/if} <input type="text" name="amount" value="{$start_quantity}" size="2"> <font class=FormButton>{$lng.lbl_add_to_cart} [img]{$ImagesDir}/GOboutonWhiteBkg.gif[/img]</font> {else} <font class=ProductDetailsTitle>1</font><input type=hidden name=amount value=1> {$lng.txt_product_downloadable} {/if} {/if} <input type=hidden name=productid value="{$products[product].productid}"> <input type=hidden name=cat value="{$smarty.get.cat}"> <input type=hidden name=page value="{$smarty.get.page}"> </form> </td></tr> </table> {/section}
use it under your own consent
__________________
4.3.8
Reply With Quote
  #35  
Old 09-05-2003, 03:51 PM
  pauld's Avatar 
pauld pauld is offline
 

Senior Member
  
Join Date: Apr 2003
Location: USA
Posts: 136
 

Default

OK great job you guys this is exactly what I was looking for.

__________________
Chaos, panic, pandemonium - my work here is done.
X-Cart version 4.0.19
Using PHP 4.4.1
MySQL 5.0.30
FreeBSD 4.7-RELEASE-p6 FreeBSD 4.7-RELEASE-p6 #0: Mon i386
(all this for now...)
http://hair-replace.com/store/
Reply With Quote
  #36  
Old 09-08-2003, 05:49 PM
  pauld's Avatar 
pauld pauld is offline
 

Senior Member
  
Join Date: Apr 2003
Location: USA
Posts: 136
 

Default

Quote:
Originally Posted by John7
Actually you see its the code itself. I think it needs to be modified to be able to do more than just display the ad buttom it needs to display the choice of which color.

Do you understand?

Did you ever receive a reply to this??????
__________________
Chaos, panic, pandemonium - my work here is done.
X-Cart version 4.0.19
Using PHP 4.4.1
MySQL 5.0.30
FreeBSD 4.7-RELEASE-p6 FreeBSD 4.7-RELEASE-p6 #0: Mon i386
(all this for now...)
http://hair-replace.com/store/
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 02:29 AM.

   

 
X-Cart forums © 2001-2020