Pedalman Posted March 9, 2018 Posted March 9, 2018 I am looking for a way to split category description into a part positioned top of the product list and into a part at the bottom. Great would be if we could via GUI/backoffice settings determine how many chars or lines we want in each section/part. My intention is that there would be a nice way to get much more text into the "viewable" description but with the 'tick' that a short part is on top of the product list as usual and the "more" link jumps to the bottom part under the product list. Google should be happy and customers not bugged with too much text before the products they are looking for. I think this could be done via smal template changes. Perhaps a new field in the DB for bottom description is needed but I do not know and do not think so. in summary it would be great if this could be integrated into the community theme or into a means this could be used with other templates/themes, too.
zimmer-media Posted March 9, 2018 Posted March 9, 2018 Yes, there are ways to set it up manually. Personally, I do not believe it will be integrated as a core code, because this is related to the theme of the shop to output the text. In the default template, you can customize the short description and description of manufacturer.tpl and supplier.tpl. So that you move the code for the full description eg under the pagination. There is no short description in the category.tpl. For this, the database, the category editing in the admin area and in the category.tpl would have to be adjusted. For example, I moved the full description in the template directly below the pagination. Personally, I find it personally awful when there is a novel above the products and you have to scroll down to see the products.
Pedalman Posted March 10, 2018 Author Posted March 10, 2018 I am totally with you and what you said I knew. That is the reason why I asked what the best way would be to split the category description since I already thought that a 2nd db entry would make sence or be necessary. Personally, I like the option to have a brief category introduction non abbreviated top of the product listing and to have the rest at the bottom of it. I am curious if an override/ module adding this 2nd database entry would do the trick. This entry could be a clone of the normal category descripton so any template could make use of it or anyone could just add the part to show this 2nd entry. Tpl allows to shorten strings so a module could even give us the option to skip the first x lines/chars before it shows the 2nd part right under product listing. PS: My problem is that I am no coder at all.
yaniv14 Posted March 10, 2018 Posted March 10, 2018 There are few free and paid modules when you can add custom html code to hooks/pages/custom hooks/etc... This should be enough to cover all your needs. http://store.nemops.com/front-office-features/28-html-block.html#.WqQhYHVubeQ https://contentbox.org/ https://mypresta.eu/en/art/news/prestashop-html-box-module-is-available-for-free.html
Pedalman Posted March 11, 2018 Author Posted March 11, 2018 Thank you Yaniv, I know them all and used them in the past. I am also a long time buyer of HTMLboxPro (MyPresta) but never thought about to use them like this. I must admit I am still unsure about how to reach my goal with these html boxes I could hook to the bottom of cateogory list in an easy and acceptable way. But it better than nothing :) and I could start with my important categories (or not so important ones at the moment dependent on the seo strategy I want to follow).
zimmer-media Posted March 12, 2018 Posted March 12, 2018 @pedalman catecory -description change the category.tpl file in the standard template find {if !empty($category->description)} <div id="category-description" class="rte">{$category->description}</div> {/if} and move it eg under the pagination example <div class="content_sortPagiBar"> <div class="bottom-pagination-content form-inline clearfix"> {include file="./product-compare.tpl" paginationId='bottom'} {include file="./pagination.tpl" paginationId='bottom'} </div> </div> </section> {/if} {if !empty($category->description)} <div id="category-description" class="rte">{$category->description}</div> {/if} result Depending on how I have some time in the next few days, I create in the category "Tips & Tricks" a separate guide with additional short description above and full description below. manufacurer description change the manufacturer.tpl file in the standard template from ``` {include file="$tpl_dir./errors.tpl"} {if empty($errors)} {$manufacturer->name|escape:'html':'UTF-8'} {if !empty($manufacturer->description)} {$manufacturer->description} {elseif !empty($manufacturer->short_description)} {$manufacturer->short_description} {/if} {if !empty($products)} {l s='List of products by manufacturer'} {$manufacturer->name|escape:'html':'UTF-8'} <div class="content_sortPagiBar clearfix"> <div class="form-inline sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="top-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl" no_follow=1} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar"> <div class="bottom-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="./pagination.tpl" paginationId='bottom'} </div> </div> </section> {else} {l s='No products for this manufacturer.'} {/if} {/if} to {include file="$tpl_dir./errors.tpl"} {if empty($errors)} {$manufacturer->name|escape:'html':'UTF-8'} {if ($manufacturer->short_description)} {$manufacturer->short_description} {/if} {if !empty($products)} {l s='List of products by manufacturer'} {$manufacturer->name|escape:'html':'UTF-8'} <div class="content_sortPagiBar clearfix"> <div class="form-inline sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="top-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl" no_follow=1} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar"> <div class="bottom-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="./pagination.tpl" paginationId='bottom'} </div> </div> </section> {if ($manufacturer->description)} <div class="rte">{$manufacturer->description}</div> {/if} {else} {l s='No products for this manufacturer.'} {/if} {/if} ``` example
MockoB Posted March 12, 2018 Posted March 12, 2018 What about the duplicate content, how it will be handled? Did you thought about it?
zimmer-media Posted March 12, 2018 Posted March 12, 2018 @mockob Which duplicate content? I just do not understand what you mean. Only the text blocks of the description will be moved and will not appear twice on a page. The description of the texts in the categories, manufacturer side etc is the responsibility of the shop operator.
MockoB Posted March 12, 2018 Posted March 12, 2018 I thought you added new block within category pages which doesn't use the canonical URL already used for the description, or the rel prev/next elements.
zimmer-media Posted March 12, 2018 Posted March 12, 2018 @mockob no no no no - not a new block :D simply move description in exists tpl-files no, these are just examples to move the full description of a category or manufacturer page under the products in the list in the standard template (if appropriate in any normal template similar). Instead of seeing the description above the products in the respective list. Personally, I hate it when I want to buy something in another store and I have to first see a long category description above the products in eg one category, before I see the products. Here only the text blocks are moved below the product list. Now I have almost duplicate content in my text. :D :D :D
zimmer-media Posted March 12, 2018 Posted March 12, 2018 manufacturer description with "read more about this manufacturer" change the manufacturer.tpl file in the standard template from original tpl to ``` {include file="$tpl_dir./errors.tpl"} {if empty($errors)} {$manufacturer->name|escape:'html':'UTF-8'} {if ($manufacturer->short_description)} {$manufacturer->short_description} {l s='read more about this manufacturer'} {/if} {if !empty($products)} {l s='List of products by manufacturer'} {$manufacturer->name|escape:'html':'UTF-8'} <div class="content_sortPagiBar clearfix"> <div class="form-inline sortPagiBar clearfix"> {include file="./product-sort.tpl"} {include file="./nbr-product-page.tpl"} </div> <div class="top-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="$tpl_dir./pagination.tpl" no_follow=1} </div> </div> {include file="./product-list.tpl" products=$products} <div class="content_sortPagiBar"> <div class="bottom-pagination-content form-inline clearfix"> {include file="./product-compare.tpl"} {include file="./pagination.tpl" paginationId='bottom'} </div> </div> </section> {if ($manufacturer->description)} <div class="rte" id="more">{$manufacturer->description}</div> {/if} {else} {l s='No products for this manufacturer.'} {/if} {/if} ``` the line {l s='read more about this manufacturer'} you can insert/create special class with eg {l s='read more about this manufacturer'} but you need change your css with a class-code (color, fontweight, etc) edit: you can also instead of class = "more" for more enter an existing class
Pedalman Posted March 13, 2018 Author Posted March 13, 2018 Hello thank you for the instructions. This I have done for years and more in my category pages but I to stop to modify my templates my own on file basis. Each big update or any other changes to my system force me to do file comparisson in order not to miss something I changed in the past. This can become many things. Latest is a file seldom touched by other for example >> \Core\Business\Payment\CoreBusinessPayment_PaymentOption.php <<. I used that one to split payment options description into to parts so I could modify payment options tpl in a nice and more compact way { private $callToActionText; private $callToActionText2; ... } Back to the changes or code movents you made: I use the Warehouse theme by IQUIT which allows this position of category description via UI. This should TB also implement. It's an easy option that user as you and me could benefit from. I also commented out the abbreviation/truncation of descriptive text so the whole category description is viewable. I think this is something that Goolge seowise might honor a tiny bit over truncating text. Who knows... What remains on the wishlist is the named option to split easily the category description. This is the important one in my eyes.
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