Jump to content

how do you display link_rewrite results on a single line?


drumslist

Recommended Posts

Trying to get the accessories listed off the product.tpl file as one line. I believe this is somewhere in the following code:

{foreach from=$accessories item=accessory name=accessories_list}
                       {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}



Does anyone have any ideas?

Thanks very much,

Andy

Link to comment
Share on other sites

Hi Rocky,

Actually I am looking for the accessories to be listed in small blocks, say 150px by 150px, with image, View Details, Add To Cart, no description and product title at the top, all on one line, horizontally. I was able to force it to work by running the foreach loop separate for each html parse with break tags in between as follows, but I am having trouble spacing out the blocks between eachother, so for now I am using non broken html space code:


{foreach from=$accessories item=accessory name=accessories_list}
                       {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

{$accessory.name|truncate:22:'...':true|escape:'htmlall':'UTF-8'}

               

{/foreach}                        




{foreach from=$accessories item=accessory name=accessories_list}
                       {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}

getImageLink($accessory.link_rewrite, $accessory.id_image, 'medium')}" alt="{$accessory.legend|escape:'htmlall':'UTF-8'}" />

               

{/foreach}




{foreach from=$accessories item=accessory name=accessories_list}
                       {assign var='accessoryLink' value=$link->getProductLink($accessory.id_product, $accessory.link_rewrite, $accessory.category)}


{displayWtPrice p=$accessory.price}

                           

{/foreach}




{/if}



I'll take any suggestions that would help clean this up.

And thank you very much Rocky

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...