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

Showing Accessories for Product(s)

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #21  
Old 01-30-2006, 07:26 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default

That will be very gratefull if you could modify it.

Thanks
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #22  
Old 03-01-2006, 11:41 AM
 
mukunig mukunig is offline
 

Member
  
Join Date: Aug 2005
Posts: 12
 

Default

I also would love to have this mod work so that the customer could select accessories using a checkbox and then move all of them to the checkout at once.

Thanks
Greg 4.0.13 heavily modified
Reply With Quote
  #23  
Old 03-01-2006, 12:48 PM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

Check boxes should be added but its going to require some extra coding. Right now im in the middle of a big project and can't exactly focus on getting check boxes added. If some one would like to work on getting this added or has already done a mod for it then please post it here.

Thanks,
__________________
X-Cart: 4.0.13 [Linux]
Reply With Quote
  #24  
Old 03-08-2006, 12:29 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default

any news on whether this could work on 4.14?
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #25  
Old 03-08-2006, 09:59 AM
 
QVS QVS is offline
 

Senior Member
  
Join Date: Nov 2004
Posts: 136
 

Default

tried installing this and got this message:

Warning: mysql_connect(): Access denied for user: 'apache@localhost' (Using password: NO) in /home/httpd/vhosts/qvsdirect.com/httpdocs/quickshop/templates_c/%%E5^E5B^E5BB4BE6%%subaccessphp.tpl.php on line 22
Could not connect to SQL db
__________________
xcart version 4.1.6
UK - Brighton

QVS ELECTRICAL SUPPLIES - http://www.qvsdirect.com

We supply a huge range of cables, electrical accessories, heating, ventilation, fire and security products, consumer units & circuit distribution, indoor and outdoor lighting, showers and water heating, tools and fixings, timer switches, sockets, switches, air conditioning, trunking, and much much more.
Reply With Quote
  #26  
Old 03-09-2006, 04:43 AM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

QVS,
Make sure
Code:
global $sql_host, $sql_user, $sql_db, $sql_password;

is not commented out.
The error says it can't connect to the MySQL DB.
Try adding this on the last line to subaccessphp.tpl
Code:
echo "SQL Host: $sql_host";

Refresh the product page and tell me what it says under "SQL Host".
__________________
X-Cart: 4.0.13 [Linux]
Reply With Quote
  #27  
Old 03-17-2006, 09:11 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

It worked fine on 4.0.18 xcart, you can see this at http://www.shisha.co.uk/shopcart/product.php?productid=16139&cat=265&page=1

I had to change the subaccessdiag.tpl to fit my own needs, the code is below:

Code:
{capture name=dialogacc}{section name=product loop=$products}{assign var="discount" value=0} <TABLE border="0" width="100%"> <TR> <TD width="90" align="center" valign="top"> {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {$lng.lbl_see_details} {else} {* THUMBNAIL *} <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}{if $featured eq 'Y'}&featured{/if}">{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {$lng.lbl_see_details}</A> {* NEW *} {* // 60 * 60 * 24 * 20 days in unix time = 1728000 *} {if ($products[product].add_date gt $smarty.now - 1728000) and ($products[product].add_date lt $smarty.now)} [img]{$ImagesDir}/mynew.gif[/img] {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0 && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} {/if} </TD> <TD valign="top"> {* PRODUCT *} <FONT class="ProductTitle">{$products[product].product}</FONT> {* PRODUCT CODE SKU NUMBER*} {$lng.lbl_sku}: {$products[product].productcode} <FONT size="1"> {* DESCRIPTION *} {$products[product].descr|truncate:300:"...":true} </FONT> <HR size="1" noshade width="100%" align="left"> {if $products[product].product_type eq "C"} {include file="buttons/details.tpl" href="product.php?productid=`$products[product].productid`&cat=`$cat`&page=`$navigation_page`"} {else} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} {* PRICE *} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> {include file="currency.tpl" value=$products[product].list_price} </S></FONT> {/if} {/if} <FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><FONT class="ConvertedProductPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}, {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes} <TABLE border="0"> <TR> <TD>[img]{$ImagesDir}/spacer.gif[/img]</TD> <TD>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes} </TR> </TABLE> {/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/if} {else} <FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT> {/if} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} {/if} </TD> </TR> </TABLE> </p>{/section} {/capture} {include file="dialog.tpl" title="Accessories for $accprod" content=$smarty.capture.dialogacc extra="width=100%"}

Also the code for the product.tpl file, i had to move this, so it was under the product and not at the bottom like you mentioned in your post.

This code is showing the bottom part of my product.tpl file
Code:
{math equation="100-(price/lprice)*100" price=$product.taxed_price lprice=$product.list_price format="%3.0f" assign=discount} <SPAN id="save_percent">{ $discount }</SPAN>% </TD></TR></TABLE>{/if} </TD> </TR> <INPUT type="hidden" name="productid" value="{$product.productid}"> <INPUT type="hidden" name="cat" value="{$smarty.get.cat|escape:"html"}"> <INPUT type="hidden" name="page" value="{$smarty.get.page|escape:"html"}"> </FORM> </TABLE> {include file="subaccess/subaccessphp.tpl"} {/capture} {include file="dialog.tpl" title=$product.producttitle content=$smarty.capture.dialog extra="width=100%"} {/if} {include file="customer/main/send_to_friend.tpl" } {if $active_modules.Detailed_Product_Images ne ""} {include file="modules/Detailed_Product_Images/product_images.tpl" } {/if} {if $active_modules.Upselling_Products ne ""} {include file="modules/Upselling_Products/related_products.tpl" } {/if} {if $active_modules.Recommended_Products ne ""} {include file="modules/Recommended_Products/recommends.tpl" } {/if} {if $active_modules.Customer_Reviews ne ""} {include file="modules/Customer_Reviews/vote_reviews.tpl" } {/if} {if $active_modules.Product_Options ne '' && $product_options ne ''} <SCRIPT type="text/javascript" language="JavaScript 1.2"> check_options(); </SCRIPT> {/if}
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #28  
Old 03-17-2006, 09:19 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

Just wanted to say that this is a very good mod, thank you for this.

It would be nice instead of using the mysql patch, there was a section in the admin area where the product is that you could enter in the cat number. But great mod, thanks.
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #29  
Old 03-22-2006, 09:12 AM
  ShishaPipeUK's Avatar 
ShishaPipeUK ShishaPipeUK is offline
 

Senior Member
  
Join Date: Jul 2005
Location: London, England.
Posts: 118
 

Default

Anock, like I said before this is a great mod.
I noticed that I have a lot of items in my accessories and the page scrolls down, so I wanted to put this in a 3 column format, so I changed the subaccessdiag.tpl file to show in 3 columns, below is my code.

The completed page you can see at http://www.shisha.co.uk/shopcart/product.php?productid=16137&cat=265&page=1

Code:
{capture name=dialogacc} {section name=product loop=$products} {assign var="discount" value=0} { if %product.first% } <table> {/if} {if $smarty.section.product.index is div by 3} </tr><tr valign="top"> {/if} <TD width="90" align="center" valign="top"> {if $active_modules.Special_Offers ne "" and $products[product].have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl" product=$products[product]} {$lng.lbl_see_details} {else} {* THUMBNAIL *} <A href="product.php?productid={$products[product].productid}&cat={$cat}&page={$navigation_page}{if $featured eq 'Y'}&featured{/if}">{include file="product_thumbnail.tpl" productid=$products[product].productid image_x=$config.Appearance.thumbnail_width product=$products[product].product tmbn_url=$products[product].tmbn_url} {$lng.lbl_see_details}</A> {* NEW *} {* // 60 * 60 * 24 * 20 days in unix time = 1728000 *} {if ($products[product].add_date gt $smarty.now - 1728000) and ($products[product].add_date lt $smarty.now)} [img]{$ImagesDir}/mynew.gif[/img] {/if} {/if} {if $active_modules.Feature_Comparison ne '' && $products[product].fclassid > 0 && $printable ne 'Y'} {include file="modules/Feature_Comparison/compare_checkbox.tpl" id=$products[product].productid} {/if} </TD> <TD valign="top"> {* PRODUCT *} <FONT class="ProductTitle">{$products[product].product}</FONT> {* PRODUCT CODE SKU NUMBER*} {$lng.lbl_sku}: {$products[product].productcode} <FONT size="1"> {* DESCRIPTION *} {$products[product].descr|truncate:300:"...":true} </FONT> <HR size="1" noshade width="100%" align="left"> {if $products[product].product_type eq "C"} {include file="buttons/details.tpl" href="product.php?productid=`$products[product].productid`&cat=`$cat`&page=`$navigation_page`"} {else} {if $active_modules.Subscriptions ne "" and $products[product].catalogprice} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if $products[product].taxed_price ne 0} {if $products[product].list_price gt 0 and $products[product].taxed_price lt $products[product].list_price} {math equation="100-(price/lprice)*100" price=$products[product].taxed_price lprice=$products[product].list_price format="%3.0f" assign=discount} {if $discount gt 0} {* PRICE *} <FONT class="MarketPrice">{$lng.lbl_market_price}: <S> {include file="currency.tpl" value=$products[product].list_price} </S></FONT> {/if} {/if} <FONT class="ProductPrice">{$lng.lbl_our_price}: {include file="currency.tpl" value=$products[product].taxed_price}</FONT><FONT class="ConvertedProductPrice">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$products[product].taxed_price}</FONT>{if $discount gt 0}, {$lng.lbl_save_price} {$discount}%{/if} {if $products[product].taxes} <TABLE border="0"> <TR> <TD>[img]{$ImagesDir}/spacer.gif[/img]</TD> <TD>{include file="customer/main/taxed_price.tpl" taxes=$products[product].taxes} </TR> </TABLE> {/if} {if $active_modules.Special_Offers ne "" and $products[product].use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl" product=$products[product]} {/if} {else} <FONT class="ProductPrice">{$lng.lbl_enter_your_price}</FONT> {/if} {/if} {if $usertype eq "C" and $config.Appearance.buynow_button_enabled eq "Y"} {include file="customer/main/buy_now.tpl" product=$products[product]} {/if} {/if} </TD> { if %product.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title="Accessories for $accprod" content=$smarty.capture.dialogacc extra="width=100%"}

All I did was to change the top part for the table and the bottom part:

Top Part:
Code:
{ if %product.first% } <table> {/if} {if $smarty.section.product.index is div by 3} </tr><tr valign="top"> {/if} <TD width="90" align="center" valign="top">

Bottom Part:
Code:
</TD> { if %product.last% } </tr></table> {/if} {/section} {/capture} {include file="dialog.tpl" title="Accessories for $accprod" content=$smarty.capture.dialogacc extra="width=100%"}

I use this change on a few of my templates to make it a 3 column view.

You can also change this to a 2 column view by changing the {if $smarty.section.product.index is div by 3} to {if $smarty.section.product.index is div by 2}
__________________
Apache/2.0.55 (Red Hat) & MYSQL Server: 5.0.24
PERL: 5.008005 / PHP: 4.4.4 - 4.3.1 X-CART

Shop carts at
http://www.nightscene.co.uk/shop/home.php
http://www.theshisha.net/shopcart/home.php
http://www.system-maintenance.com/maint/home.php
http://www.tabac4u.com
Reply With Quote
  #30  
Old 03-28-2006, 01:33 AM
  anoack's Avatar 
anoack anoack is offline
 

Senior Member
  
Join Date: Dec 2002
Location: Austin, TX
Posts: 113
 

Default

ShishaPipeUK,
Great work! I am glad the mod is working out well for your site.

P.S. Great website! Too bad I don't live in the UK
__________________
X-Cart: 4.0.13 [Linux]
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



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 08:37 PM.

   

 
X-Cart forums © 2001-2020