Search the Community
Showing results for tags 'Tutorials'.
-
PrestaShop 1.5.2 Tutorial: Call for Price Modifications A gift to PrestaShop user from Shop Save N Earn 12/15/2012 Shop Save N Earn William R. Williamson PrestaShop 1.5.2 Tutorial: Call for Price Modifications Hi everyone it's me again, William Williamsons at Shop Save N Earn; with another great tutorial for PrestaShop in which many of my fellow PrestaShop users can definitely use. Firstly I want to say that if anyone knows how I would be able to turn this into a module to release for free as a community project please do at [email protected]. I personally, believe this is a necessity for all shops as many suppliers invoke restrictions that you must follow, which happen to be the most largest suppliers or manufacturers. Summary Okay to summarize this tutorial we will edit three files in two different directories product_list.tpl, product.tpl, and products-comparision.tpl in themes/default/ directory of their store and one file in the modules/homefeatured/homefeatured.tpl file. The edits are small and simple so it should be an easy job. A. Find in themes/default/ Find and open the file product_list.tpl ------------------------------------------------------------------------------------------------------- Find the line below ------------------------------------------------------------------------------------------------------- <div class="content_price"> ------------------------------------------------------------------------------------------------------- after this line after ------------------------------------------------------------------------------------------------------- {if $product.price < '1.00'}<span [b]class="callforprice">[/b]Call For Price!!!</span>{/if} ------------------------------------------------------------------------------------------------------- Make sure to create a class in global.css an example is below ------------------------------------------------------------------------------------------------------- .callforprice { font-family: Verdana, Geneva, sans-serif; font-size: 14px; font-style: italic; line-height: normal; font-weight: bolder; font-variant: normal; color: #F00; text-decoration: blink; } ------------------------------------------------------------------------------------------------------- Find the line below ------------------------------------------------------------------------------------------------------- {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;"> ------------------------------------------------------------------------------------------------------- replace it with the line below ------------------------------------------------------------------------------------------------------- {if isset($product.show_price) && $product.price > '1.00' && $product.show_price && !isset($restricted_country_mode)}<span class="price" style="display: inline;"> ------------------------------------------------------------------------------------------------------- Find and open the file product.tpl ------------------------------------------------------------------------------------------------------- Find the line beow ------------------------------------------------------------------------------------------------------- <div class="price"> ------------------------------------------------------------------------------------------------------- After this add the code above ------------------------------------------------------------------------------------------------------- {if $product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision) < '1.00'}<p class="callforprice">Call For Price!!!</p>{/if} {else} --------------------------------------------------------------------------------------------------------- and make sure it is inserted before the code below ------------------------------------------------------------------------------------------------------- {if !$priceDisplay || $priceDisplay == 2} {assign var='productPrice' value=$product->getPrice(true, $smarty.const.NULL, $priceDisplayPrecision)} {assign var='productPriceWithoutRedution' value=$product->getPriceWithoutReduct(false, $smarty.const.NULL)} {elseif $priceDisplay == 1} {assign var='productPrice' value=$product->getPrice(false, $smarty.const.NULL, $priceDisplayPrecision)} ------------------------------------------------------------------------------------------------------- Find and open the file---products-comparison.tpl ------------------------------------------------------------------------------------------------------- Find the line below ------------------------------------------------------------------------------------------------------- <p class="price_container"> ------------------------------------------------------------------------------------------------------- After the line above add ------------------------------------------------------------------------------------------------------- {if $product->getPrice($taxes_behavior) < '1.00'}<span class="callforprice">Call For Price!!!</span> {else} ------------------------------------------------------------------------------------------------------- Make sure it is above the line below ------------------------------------------------------------------------------------------------------- <span class="price">{convertPrice price=$product->getPrice($taxes_behavior)}</span></p> ------------------------------------------------------------------------------------------------------- After the line above add the line below ------------------------------------------------------------------------------------------------------- {/if} ------------------------------------------------------------------------------------------------------- B. Find in modules/homefeatured/ Find and open the file homefeatured.tpl ------------------------------------------------------------------------------------------------------- Find the line below ------------------------------------------------------------------------------------------------------- <a class="lnk_more" href="{$product.link}" title="{l s='View' mod='homefeatured'}">{l s='View' mod='homefeatured'}</a> ------------------------------------------------------------------------------------------------------- After the line above add ------------------------------------------------------------------------------------------------------- {if $product.price < '1.00'}<span class="callforprice"><br/>Call For Price!!!</span> {else} ------------------------------------------------------------------------------------------------------- But make sure it is above the line below ------------------------------------------------------------------------------------------------------- {if $product.show_price AND !isset($restricted_country_mode) AND !$PS_CATALOG_MODE}<p class="price_container"><span class="price">{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span></p>{else}<div style="height:21px;"></div>{/if} ------------------------------------------------------------------------------------------------------- After the above lines add the line below ------------------------------------------------------------------------------------------------------- {/if} ------------------------------------------------------------------------------------------------------- That's it folks, hope it has helped. Conclusion Well that concludes our tutorial, however there may be more edits that could result in the pricing showing, which must also be modified. Although, doing the modifications this way ensures it still does not show a real price just 0.00, thus saving the business owner from losing their partnership and supplier contact. I like to play it safe personally. As always please be kind, if there are any issues errors or typo's please email me the corrections in a positive manner. Also if this tutorial helps you and you use it please shoot some back links to me at http://www.shopsavenearn.com thanks. Here is a pdf version PrestaShop 1.5.2 Tutorial- Call for Price Modifications.pdf
- 18 replies
-
- Shop Save N Earn
- www.shopsavenearn.com
- (and 5 more)
-
Hello, I am new to prestashop and for the past days I've been reading a lot. Extensive documentation, nemo's videos which are really great but a bit focused on the front and backoffice rather then development. I love the prestashop concept but the lack of examples and tutorials makes me think twice before going deeper into it. So far I don't have any client which needs 95% of all the prestashop features and that makes me think if I shouldn't do simpler solutions that would save me so much hours of studying a CMS such as presta. I feel I already lost too much time but when looking at Nemo example I thought in doing something similar but focused on modifying the default theme to a very simple theme with all steps explained (I will even write to him hoping that he also helps me a bit). Please note that it won't certainly be something as good looking as: http://www.prestashop.com/forums/topic/236264-free-theme-niceclean-customizable-default-theme-skin-updated-0608/ and it isn't even the goal of the tutorial I am going to do. The goal will be: Teach how to do things and not exactly in how good the design will be. Simple example that will be used for the tutorial and topics that would be approached Goal - Shop with only 8 or 12 products to sale. Even if it has more they will all be listed in homepage. No searching needed. 1) Homepage should look like: (https://dl.dropboxusercontent.com/u/33634740/homepage.png) Removing all unecessary modules (two ways: in backoffice and in files directly) Hooks explanation: All existant hooks and creating new ones Inserting a sticky bar at top (width is optional) In this bar there would be external links floated left and cart floated right. Inserting a background image Inserting a logo anywhere (in this case in the middle for example) Editing the main page width Controlling display information and style: "Display 1" or "Display 2" Editing footer: footer1, footer2 or non existant. With internal or external links. 2) Simple page: (https://dl.dropboxusercontent.com/u/33634740/simple_page.png) for simplicity this would use the same layout of the homepage for a cms page, register, my account and so on... in the tutorial I would also approach how to modify these pages. 3) Implementation of a generic payment solution like paypal and a more specific one to a certain country. Note: I know that external links aren't good to use in a forum but I will keep the files there for as long as I can. Do you guys think this is a good idea? It will give me a lot of work and I hope I can receive some help of the more experienced ones. If there are already good video tutorial about this could you please point me to them? Thanks
-
Hi guys! I'm gathering information on the "most wanted" tutorial topics about prestashop. Is there anything in particular you'd like to learn about the software? Every suggestion will be strongly taken in consideration, so go ahead and express your thoughts I'll be making free tutorials out of them. to the mods: since i plan to write tutorials on theming too, can i create another post in the integration section? Fabio