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

Improved Related Products for 4.3.2

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 07-20-2010, 05:28 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Improved Related Products for 4.3.2

This are 2 different modules. Upselling products is what you define for every product as an upsell products, recommended products are random.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #12  
Old 07-21-2010, 07:43 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Improved Related Products for 4.3.2

I'm glad it works fine for you Vacman - I think Qualiteam should make it look like this as standard.
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #13  
Old 07-21-2010, 05:38 PM
  Vacman's Avatar 
Vacman Vacman is offline
 

X-Adept
  
Join Date: Sep 2005
Location: Torrance, CA
Posts: 792
 

Default Re: Improved Related Products for 4.3.2

Yep - Thanks for the help as well.
__________________
Carl Tice

X-Cart 4.6.6
X-Payments 3.0
ReBOOT 3.4.1

PHP 5.6.30
MySQL 5.6.35
Linux 2.6.32-042stab120.18
ionCube PHP Loader v4.7.3
Perl 5.10.1
Reply With Quote
  #14  
Old 07-25-2010, 11:31 PM
 
Torres Torres is offline
 

Member
  
Join Date: Apr 2010
Posts: 26
 

Default Re: Improved Related Products for 4.3.2

Thanks! This works great for me.
__________________
X-Cart 4.3.2
X-SpecialOffers
Reply With Quote
  #15  
Old 07-26-2010, 12:04 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Improved Related Products for 4.3.2

I've updated the code a little - I've edited the first post so the new code is in there. I've added two more <a href> elements, to go around the product title and price. Before I did this, there were problems with Internet Explorer underlining them both, and I couldn't target them properly using CSS (as the image, product title and price were all contained within one <a> element.)

Just copy and paste it over your current related_products.tpl, everything else should be the same.
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #16  
Old 07-26-2010, 12:29 AM
 
Torres Torres is offline
 

Member
  
Join Date: Apr 2010
Posts: 26
 

Default Re: Improved Related Products for 4.3.2

Great. Maybe flip these two lines around so the open/close tags line up nicer:

PHP Code:
<a href="product.php?productid={ $product_links[cat_num].productid }"{if $config.Modules.upselling_new_window eq 'Y'target="_blank"{/if}>
<
div class="related"
__________________
X-Cart 4.3.2
X-SpecialOffers
Reply With Quote

The following user thanks Torres for this useful post:
Sisom (07-26-2010)
  #17  
Old 07-26-2010, 02:29 AM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Improved Related Products for 4.3.2

Thanks for that Torres, I've fixed it now.
__________________
X-Cart Gold Version 4.3.2
Reply With Quote
  #18  
Old 07-30-2010, 02:17 PM
 
worldomega worldomega is offline
 

Advanced Member
  
Join Date: Apr 2009
Posts: 79
 

Default Re: Improved Related Products for 4.3.2

Hi Sisom,

Nice mod. Unrelated to this, on your product thumbnails, you have "See Details" link added. How did you do this?
__________________
Using 4.3.1 and looking forward to 4.4. I wish for easy upgrade!
Reply With Quote
  #19  
Old 07-30-2010, 02:41 PM
 
Sisom Sisom is offline
 

eXpert
  
Join Date: Sep 2006
Posts: 310
 

Default Re: Improved Related Products for 4.3.2

I think the 'See Details' link was already there, in 4.3.2?

This is my code for
/customer/main/products_list.tpl

Code:
{* $Id: products_list.tpl,v 1.18 2009/07/23 11:12:33 igoryan Exp $ vim: set ts=2 sw=2 sts=2 et: *} <div class="products products-list"> {foreach from=$products item=product name=products} <script type="text/javascript"> <!-- products_data[{$product.productid}] = {ldelim}{rdelim}; --> </script> {if $active_modules.Product_Configurator and $is_pconf and $current_product} {assign var="url" value="product.php?productid=`$product.productid`&amp;pconf=`$current_product.productid`&amp;slot=`$slot`"} {else} {assign var="url" value="product.php?productid=`$product.productid`&amp;cat=`$cat`&amp;page=`$navigation_page`"} {if $featured eq 'Y'} {assign var="url" value=$url|cat:"&amp;featured=Y"} {/if} {/if} <div{interline name=products additional_class=item}> <div class="image"{if $config.Appearance.thumbnail_width gt 0 || $product.tmbn_x gt 0} style="width: {$max_images_width|default:$config.Appearance.thumbnail_width|default:$product.tmbn_x}px;"{/if}> <a href="{$url}">{include file="product_thumbnail.tpl" productid=$product.productid image_x=$product.tmbn_x image_y=$product.tmbn_y product=$product.product tmbn_url=$product.tmbn_url}</a> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl"} {/if} <a href="{$url}" class="see-details">{$lng.lbl_see_details}</a> {if $active_modules.Feature_Comparison} {include file="modules/Feature_Comparison/compare_checkbox.tpl"} {/if} </div> <div class="details"{if $config.Appearance.thumbnail_width gt 0 || $product.tmbn_x gt 0} style="margin-left: {$max_images_width|default:$config.Appearance.thumbnail_width|default:$product.tmbn_x}px;"{/if}> <a href="{$url}" class="product-title">{$product.product|escape}</a> {* MOVING SKU NUMBER LOWER DOWN *} {* {if $config.Appearance.display_productcode_in_list eq "Y" && $product.productcode ne ""} <div class="sku">{$lng.lbl_sku}: <span class="sku-value">{$product.productcode|escape}</span></div> {/if} *} <div class="descr">{$product.descr}</div> {if $product.rating_data} {include file="modules/Customer_Reviews/vote_bar.tpl" rating=$product.rating_data productid=$product.productid} {/if} {if $config.Appearance.display_productcode_in_list eq "Y" && $product.productcode ne ""} <div class="sku">{$lng.lbl_product_code}: <span class="sku-value">{$product.productcode|escape}</span></div> {/if} <hr /> </div> <!-- END OF DETAILS --> <div class="details2"> {if $product.product_type eq "C"} {include file="customer/buttons/details.tpl" href=$url} {else} {if $active_modules.Subscriptions ne "" && ($product.catalogprice gt 0 || $product.sub_priceplan gt 0)} {include file="modules/Subscriptions/subscription_info_inlist.tpl"} {else} {if !$product.appearance.is_auction} {if $product.appearance.has_price} <div class="price-row{if $active_modules.Special_Offers ne "" && $product.use_special_price ne ""} special-price-row{/if}"> <span class="price">{$lng.lbl_our_price}:</span> <span class="price-value">{include file="currency.tpl" value=$product.taxed_price}</span> {* COMMENTING OUT PRE-VAT PRICE - START *} {* <span class="market-price">{include file="customer/main/alter_currency_value.tpl" alter_currency_value=$product.taxed_price}</span> *} {* COMMENTING OUT PRE-VAT PRICE - END *} </div> {if $product.appearance.has_market_price && $product.appearance.market_price_discount gt 0} <div class="market-price"> <p> {$lng.lbl_market_price}: <span class="market-price-value">{include file="currency.tpl" value=$product.list_price}</span> {if $product.appearance.market_price_discount gt 0} {if $config.General.alter_currency_symbol ne ""}, {/if} <span class="price-save">{$lng.lbl_save_price} {$product.appearance.market_price_discount}%</span> {/if} </p> </div> {/if} {if $product.taxes} <div class="taxes"> {include file="customer/main/taxed_price.tpl" taxes=$product.taxes is_subtax=true} </div> {/if} {/if} {if $active_modules.Special_Offers ne "" && $product.use_special_price ne ""} {include file="modules/Special_Offers/customer/product_special_price.tpl"} {/if} {else} <span class="price">{$lng.lbl_enter_your_price}</span><br /> {$lng.lbl_enter_your_price_note} {/if} {/if} {if $active_modules.Product_Configurator and $is_pconf and $current_product} {include file="modules/Product_Configurator/pconf_add_form.tpl"} {elseif $product.appearance.buy_now_enabled and $product.product_type ne "C"} {include file="customer/main/buy_now.tpl"} {/if} {/if} </div> <div class="clearing"></div> </div> {/foreach} </div>

I think if you insert it in the same place in your template, it will work. It's odd that you don't have it, because it was there in 4.1.0!
__________________
X-Cart Gold Version 4.3.2
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 07:14 PM.

   

 
X-Cart forums © 2001-2020