[Shop made simple] Thumbnails of featured products

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
zappodrom
Forum Members
Forum Members
Posts: 91
Joined: Wed Apr 23, 2008 11:38 am
Location: Germany

[Shop made simple] Thumbnails of featured products

Post by zappodrom »

Hi

I use CMSms 1.8.2 and Shop made simple for a little Website to display the articles and so on...
All worked fine so far. Thank you, Duketown, for the great Module!

My only problem is a little list of thumbnails from the featured products on the right side of my page. For "Featured products" I use the following Template:

Code: Select all

{foreach from=$products item=featentry}

{capture assign='thumb_img'}
  {$config_images_uploads_url}{$featentry->prodimage}
{/capture}

{image src=uploads/$thumb_img alt='Angebote von Stege Werbung'}{$image_uploads_url}
{/foreach}
The HTML-Source looks like this:

Code: Select all

<img src="http://neu.stegewerbung.de/uploads/images/uploads/  /products/11681_05.jpg" alt="FooBar" title="FooBar"/>
Is there a way to get the needed tn_ before the filename to make the code look like this?

Code: Select all

<img src="http://neu.stegewerbung.de/uploads/images/uploads/products/tn_11681_05.jpg" alt="FooBar" title="FooBar"/>
Thanks for reply!
Regards,
Christian

----
[X] <--- Nail here for new Monitor!
User avatar
zappodrom
Forum Members
Forum Members
Posts: 91
Joined: Wed Apr 23, 2008 11:38 am
Location: Germany

Re: [Shop made simple] Thumbnails of featured products

Post by zappodrom »

Hi,

I've found the following code here. Is it possible to adapt this to my needs? I'm not familiar with regex so every help would be appreciated.

Code: Select all

{assign var='config' value=$gCms->GetConfig()}
{assign var='config_image_uploads_url' value=$config.image_uploads_url|regex_replace:'/\/+$/':''}

{foreach from=$products item=entry}
  <div style="padding-top:30px;">
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
  <td width="160">
  <div align="left">
 {capture assign='big_img'}{$config_image_uploads_url}{$entry->prodimage|regex_replace:'/\/+tn_([^\/]*)$/':'/$1'}{/capture}

--- Snip ---
It's look to me like the regex_replace does the magic. But it does'nt work for me...

Regards,
Zappodrom
Regards,
Christian

----
[X] <--- Nail here for new Monitor!
Post Reply

Return to “Modules/Add-Ons”