Jump to content

Edit History

zenerry

zenerry


found a solution

Hello @fujitsuDev

I'm pretty new to programming , finally I understood what you did.

I've copy pasted you code inside my cart-detailed-product-line.tpl file without success.

I've just needed to truncate in order to cut off the ID of the variant.

	  <div class="variants">
        {$clear1 = "{$product.url|regex_replace:'/[^\d*]+$/':''}"}
        {$clear2 = "{$clear1|regex_replace:'/^(.*[\/])/':''}"}
        {$img_id = "{$clear2|truncate:3:""}"}
        <div class="texture" style="background-image: url({$urls.img_ps_url}co/{$img_id}.jpg); width:50px; height:50px"></div>
	</div>

Do you know how to cut until the "-" (dash) intead of truncating the first 3 chars?

Thanks.

zenerry

zenerry

Hello @fujitsuDev

I'm pretty new to programming , finally I understood what you did.

I've copy pasted you code inside my cart-detailed-product-line.tpl file without success.

Did you modified something or maybe your are not in PS 1.7?

Thanks.

zenerry

zenerry

Hello @fujitsuDev

could you explain a little more your code please?

I'm pretty new to programming and I am not able to understand what to do with those "regex" and "clear"s.

I've copy pasted you code inside my cart-detailed-product-line.tpl file without success.

Thanks.

×
×
  • Create New...