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

help with products_list.tpl problem, repeating product?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 09-27-2011, 03:23 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

How would I best cut everything out of the templates, and only display the table I am wanting to display? I have provided you code earlier. Can I just make a blank products_t.tpl, or does this also require other files?
__________________
Version 4.4.3
Reply With Quote
  #12  
Old 09-27-2011, 03:40 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

I would try using this code;

<tr>
<td class="PrinterDescriptionText" style="border-width:0px;"><a href="{$url}">{$product.productcode|escape}</a><br/><img src="{$http_location}/image.php?id={$product.productid}" width="75"></td>
<td class="PrinterDescriptionText" style="border-width:0px;"><a href="{$url}">{$product.productcode|escape}</a><br/><img src="{$http_location}/image.php?id={$product.productid}" width="75"></td>
<td class="PrinterDescriptionText" style="border-width:0px;"><a href="{$url}">{$product.productcode|escape}</a><br/><img src="{$http_location}/image.php?id={$product.productid}" width="75"></td>
<td class="PrinterDescriptionText" style="border-width:0px;"><a href="{$url}">{$product.productcode|escape}</a><br/><img src="{$http_location}/image.php?id={$product.productid}" width="75"></td>
<td class="PrinterDescriptionText" style="border-width:0px;"><a href="{$url}">{$product.productcode|escape}</a><br/><img src="{$http_location}/image.php?id={$product.productid}" width="75"></td>

</tr>




inside /public_html/newsite/skin/common_files/modules/Manufacturers/customer_manufacturer_products.tpl


but it does not seem to work?
__________________
Version 4.4.3
Reply With Quote
  #13  
Old 09-27-2011, 03:55 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: help with products_list.tpl problem, repeating product?

No, that is not going to work. Don't try to empty everything out and start with a blank, just edit what is there to achieve the desired effect.

What I would do, is first use webmaster mode, to ensure that products_t.tpl is the template that is displaying the table that you are trying to change.

Then simply enable Admin->General Settings->Appearance->Display product code (SKU) in the products list.

Now in products_t.tpl line 23 see this:
Code:
<div class="sku">{$lng.lbl_sku}: {$product.productcode|escape}</div>
Delete {$lng.lbl_sku}: and then add your <a></a> around {$product.productcode|escape}
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #14  
Old 09-27-2011, 04:24 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

Ok, i did this;

<div class="sku"><a href="{$url}">{$product.productcode|escape}</a></div>

and i turned on the SKU from the backend. Now it's showing like this;

SKU: LC-57BK without any hyperlink to it. WTF?
__________________
Version 4.4.3
Reply With Quote
  #15  
Old 09-27-2011, 04:27 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: help with products_list.tpl problem, repeating product?

Xcart has caches yes one way to clear them is: http://5dollarinkcartridges.com.au/newsite/cleanup.php

But I think the issue is just that we are working with the wrong tpl. I doing my best to teach you what I know of this system, sometimes I forget that people need to know the basics first. The first thing I do is make sure I am working in the right tpl. It is probably customer_manufacturer_products.tpl just as you said.

You can use webmaster mode to determine what tpl's are being called on what page. It also gives you a list of variables and there values. Lets make sure that we are working in the right section, when you referred to products_list.tpl I immediately assumed that you were working inside a category. (oops)

Familiarize yourself with webmaster mode, take note of all the templates on the page and what each one controls.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #16  
Old 09-27-2011, 04:31 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

Ah. I was editing the wrong files! It seems to be linking the SKU, now.


Now, how do I drop EVERYTHING else, get rid of the boxes, everything else, except the pictures of all the products?
__________________
Version 4.4.3
Reply With Quote
  #17  
Old 09-27-2011, 04:38 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: help with products_list.tpl problem, repeating product?

Glad we are getting on the right track. Can you link to the page you are working on, and tell me what template you are editing?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #18  
Old 09-27-2011, 04:40 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

http://5dollarinkcartridges.com.au/newsite/manufacturers.php?manufacturerid=3

using products_t.tpl


I just want to show the SKU, linked to the product, and then a picture below it of the product. THAT'S ALL.
__________________
Version 4.4.3
Reply With Quote
  #19  
Old 09-27-2011, 04:58 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: help with products_list.tpl problem, repeating product?

Before we go any further, do you realize that this template may be used in other sections? Like the home page or a category page. Look at:
http://5dollarinkcartridges.com.au/newsite/home.php?cat=4 The categories are being displayed according to products_t.tpl I believe, due to the setting of Number of Columns in Appearance section. If you were to remove the number of columns setting, this category page would most likely be displayed using the products_list.tpl

If you want to edit the display in just this section, make a copy of products_t.tpl and call it products_t_manu.tpl or whatever. Then look in the template that is calling the products_t.tpl on your manufacturers page, it will be something like {include file="customer/main/products_t.tpl"} change this to reference your new tpl.

Look in your new tpl.

Move this row:
Code:
<tr{interline name=products_matrix}> {foreach from=$row item=product name=products} {if $product} <td{interline name=products additional_class="product-cell"}> <div class="image"> {if $product.product_class eq 'O' or $product.product_class eq 'W' or $product.product_class eq 'D'} {include file="customer/main/program_thumbnail.tpl"} {else} <table> <tr><td> <a href="{$product.alt_url|default:$product.page_url|amp}">{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> </td></tr> <tr><td align="center" width="{if $max_images_width gt "0"}{$max_images_width}{/if}" class="product-custom"> <a href="{$product.alt_url|default:$product.page_url|amp}" class="product-custom" title="{$product.product|amp}">{$product.product|amp}</a> </td></tr> </table> {/if} {if $active_modules.Special_Offers and $product.have_offers} {include file="modules/Special_Offers/customer/product_offer_thumb.tpl"} {/if} </div> </td> {/if} {/foreach} </tr>
above your sku numbers.

Delete or comment out:
Code:
{if $active_modules.Customer_Reviews and $rating_data_exists} <tr{interline name=products_matrix}> {foreach from=$row item=product name=products} {if $product} <td{interline name=products additional_class="product-cell"}> {if $product.rating_data} {include file="modules/Customer_Reviews/vote_bar.tpl" rating=$product.rating_data productid=$product.productid} {/if} </td> {/if} {/foreach} </tr> {/if}

Comments are controlled by
{* This is a comment
it can be multi-line *}

Use comments to non-destructively edit the code, while learning what controls what, instead of deleting you can first comment it out to see how it behaves.

I think I have steered you close to the answer now, you will need to continue to look through and eliminate a row at a time.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #20  
Old 09-27-2011, 05:01 PM
 
plnewton plnewton is offline
 

Advanced Member
  
Join Date: Sep 2011
Posts: 65
 

Default Re: help with products_list.tpl problem, repeating product?

How do I include products_t.tpl into /public_html/newsite/skin/common_files/modules/Manufacturers/customer_manufacturer_products.tpl ?

{include file="customer/main/products_t.tpl"} ?
__________________
Version 4.4.3
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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:51 PM.

   

 
X-Cart forums © 2001-2020