Innocent Dudley Posted March 23, 2010 Share Posted March 23, 2010 How do I recover it? It was done by a dev who is no longer available.Here's the page:http://trunkation.com/shop/product.php?id_product=27And the code from what I think is the correct page from the theme directory: {l s='Add to cart'} {if isset($products)} <!-- Products list --> {assign var='liHeight' value=360} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} {foreach from=$products item=product name=products} getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" /> {$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {l s='Add to cart'} {l s='View'} {/foreach} <!-- /Products list --> {/if} Link to comment Share on other sites More sharing options...
razaro Posted March 23, 2010 Share Posted March 23, 2010 Error is probably in product.tpl somewhere near Availability text.Code you posted is from product-list.tpl and it has also errors.That first div is not closed and Add to cart outside Product list have no function at all.Here is code you could try {if isset($products)} <!-- Products list --> {assign var='liHeight' value=360} {assign var='nbItemsPerLine' value=4} {assign var='nbLi' value=$products|@count} {assign var='nbLines' value=$nbLi/$nbItemsPerLine|ceil} {assign var='ulHeight' value=$nbLines*$liHeight} {foreach from=$products item=product name=products} getImageLink($product.link_rewrite, $product.id_image, 'home')}" height="{$homeSize.height}" width="{$homeSize.width}" alt="{$product.legend|escape:htmlall:'UTF-8'}" /> {$product.name|truncate:27:'...'|escape:'htmlall':'UTF-8'} {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} {if $product.on_sale} {l s='On sale!'} {elseif ($product.reduction_price != 0 || $product.reduction_percent != 0) && ($product.reduction_from == $product.reduction_to OR ($smarty.now|date_format:'%Y-%m-%d' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d' >= $product.reduction_from))} {l s='Price lowered!'} {/if} {l s='Add to cart'} {l s='View'} {/foreach} <!-- /Products list --> {/if} Also you have error with auto complete look here for solution.And cart text in right column ,add to css #cart_block_summary {color:black;} Link to comment Share on other sites More sharing options...
Innocent Dudley Posted March 23, 2010 Author Share Posted March 23, 2010 I should have been more specific. I meant that the "Add to cart" button was not present in the product's detail page. Link to comment Share on other sites More sharing options...
razaro Posted March 23, 2010 Share Posted March 23, 2010 No i should be more specific because everything below Availability text was missing add to cart, description and footer.I went again to your site and it seams you fixed it ? Link to comment Share on other sites More sharing options...
Innocent Dudley Posted March 23, 2010 Author Share Posted March 23, 2010 Yeah, I found the problem. A missing was missing and I found the tag I needed to re-add.Thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now