Jump to content

<SOLVED>PrestaShop as a catalog only


Recommended Posts

Hello Everybody!!! - I thank you in advance for reading a newbie post.

I am trying to use my Prestashop for catalog only...I was able to remove the cart feature but still need some minor fixes - few questions:

1: How do I remove the price (it's at $0 now)
2: How do I remove Quantity (1)
3: How do I chage the word 'Reference' to Product Code
4: How do I change the word 'Catergories' to 'Our Products'

Any help is much appreciated, Once again...Thanks for reading :)

-Monk

THANKS ROCKY!!!

Link to comment
Share on other sites

To remove the price, change lines 187-227 of product.tpl in your theme's directory from:

<!-- prices -->


   {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 %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}
{l s='Price lowered!'}
   {/if}



   {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL)}
           {if $tax_enabled}{l s='tax incl.'}{/if}
   {/if}
   {if $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}
           {if $tax_enabled}{l s='tax excl.'}{/if}
   {/if}

   {if $priceDisplay == 2}


{convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'}
   {/if}



{if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}


   {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPriceWithoutReduct()}
           {if $tax_enabled}{l s='tax incl.'}{/if}
   {/if}
   {if $priceDisplay == 1}
{convertPrice price=$product->getPriceWithoutReduct(true)}
           {if $tax_enabled}{l s='tax excl.'}{/if}
   {/if}


{/if}
{if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}

{l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'}
{/if}



to:

{*<!-- prices -->


   {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 %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}
{l s='Price lowered!'}
   {/if}



   {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL)}
           {if $tax_enabled}{l s='tax incl.'}{/if}
   {/if}
   {if $priceDisplay == 1}
{convertPrice price=$product->getPrice(false, $smarty.const.NULL)}
           {if $tax_enabled}{l s='tax excl.'}{/if}
   {/if}

   {if $priceDisplay == 2}


{convertPrice price=$product->getPrice(false, $smarty.const.NULL)} {l s='tax excl.'}
   {/if}



{if ($product->reduction_price != 0 || $product->reduction_percent != 0) && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}


   {if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPriceWithoutReduct()}
           {if $tax_enabled}{l s='tax incl.'}{/if}
   {/if}
   {if $priceDisplay == 1}
{convertPrice price=$product->getPriceWithoutReduct(true)}
           {if $tax_enabled}{l s='tax excl.'}{/if}
   {/if}


{/if}
{if $product->reduction_percent != 0 && ($product->reduction_from == $product->reduction_to OR ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $product->reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product->reduction_from))}

{l s='(price reduced by'} {$product->reduction_percent|floatval} %{l s=')'}
{/if}*}



and to remove the quantity box, change line 256 from:


quantity == 0) || $virtual} style="display:none;"{/if}>



to:





and to remove the "Add to cart" button, change line 283 from:


quantity == 0} style="display:none;"{/if} id="add_to_cart" class="buttons_bottom_block"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>



to:

{*
quantity == 0} style="display:none;"{/if} id="add_to_cart" class="buttons_bottom_block"><input type="submit" name="Submit" value="{l s='Add to cart'}" class="exclusive" /></p>

Link to comment
Share on other sites

To remove the price and "Add to cart" button from the product listings, change lines 12-25 of product-list.tpl in your theme's directory from:

{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 %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))}
{l s='Price lowered!'}
{/if}

{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}

{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
{else}
{l s='Add to cart'}
{/if}



to:

{*{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 %H:%M:%S' <= $product.reduction_to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $product.reduction_from))}
{l s='Price lowered!'}
{/if}

{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}

{if ($product.allow_oosp OR $product.quantity > 0) && $product.customizable != 2}
{l s='Add to cart'}
{else}
{l s='Add to cart'}
{/if}*}

Link to comment
Share on other sites

To change "Reference" to "Product code", go to Tools > Translations, select "Front Office translations" in the dropdown, click the USA flag, then scroll down to the "prestashop - product" section and enter "Product code" as the translation for "Reference". To change "Categories" to "Our Products", go to Tools > Translations, select "Module translations" in the dropdown, click the USA flag, then scroll down to the "prestashop - blockcategories" section and enter "Our Products" as the translation for "Categories".

Link to comment
Share on other sites

when working out this....

i face a problem where i cant able to proceed with view button....

when i clicked view. it shows an empty page.....

i request you to solve this for me......

thanks in advance....

cheers
Ash


Ash,

I had no problem working on it...perhaps you can attach a file...and i can attempt to help you :)

but i'm a newbie...
Link to comment
Share on other sites

Whenever a blank page is encountered, you should edit config/config.inc.php and temporarily change 'display_errors' from 'off' to 'on' so that you get an error message instead of a blank page, then post the error message here.


Why only temporarily? isn't it better to leave it just on? so that you can tell whenever there is an error?
Link to comment
Share on other sites

Because someone may find a way to cause an error on your website using a bad parameter, for example, then they will see an error message that includes the name of your server directory. They then have your username and can use a brute-force attack to find the password.

Link to comment
Share on other sites

i found the error on line 283 of product.tpl.....

just a small error where i didn't gave a comment out *} at end....i just blindly copied your code and pasted over thr....

i request you to edit that post on line 283 for others who use this......


a grt thanks to both rocky and corruptedmonk.....

cheers
Ash

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