Jump to content

[SOLVED] Lost add to card to Product page?


Recommended Posts

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=27

And 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

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

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...