News:

Looking for documentation? Take a look on our wiki

Main Menu

Read more function, product & category level

Started by anderssonh, January 26, 2017, 20:42:24 PM

Previous topic - Next topic

anderssonh

Hi!

I am in desperate need of a "read more" function, especially on category level but also product level in my Virtuemart 3 shop. Main reason is to be able to have a rich, unique text with good content (mainly for SEO reasons on competitive product categories but also for the content quality) without having the product at the bottom forcing the customer to scroll ages to see the actual products. It is likely he gives up before seeing the actual products.

I have looked through this forum but havent found a clue of what to do really. The Joomla Read more function will only work for Joomla articles / blog content and not in Virtuemart 3. Has anyone here done this and if so could be kind enough to point me in the right direction?

The solutions we have tried has not been able to give us the opportunity to have images in the collapsed view and gave other issues as well.

Thanks in advance!

Joomla: 3.6.5
Virtuemart: 3.0.18
PHP built on: Linux am11.siteground.biz 3.12.18-clouder0 #3 SMP Thu Oct 20 14:54:11 EEST 2016 x86_64
Database version: 5.6.28-76.1-log
Database collation: utf8_general_ci
Database Connection Collation: utf8mb4_general_ci
PHP-version: 5.6.29
Web server: Apache
Web server till PHP interface: cgi-fcgi
Joomla version: Joomla! 3.6.5 Stable [ Noether ] 1-December-2016 22:46 GMT
Joomla! platform version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
Web client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36


anderssonh

Is there really no one at this eminent forum who have had the same idea for this function?

Studio 42

In Vm you have short desc and description, in Joomla you have only description and readmore to split it.
YOu can display short desc in the cateogry list in most of templates., if you want you can display description in the category on adding some code and hide it.
But you must know that Google check the CSS and hidden display is removed from SEO search rank calculation, as i know.

lindapowers

You  can ceate custom module with category descriptions in Joomla and place them inside any position of your template per categories if you have ew categories.

anderssonh

Thanks! Yes i have done that but the module always comes at the end of the category meaning below all the products, i have tested the crawling difference on having a very long category description and then a module with text at the bottom of the page. I do get much better result from having it in the actual category instead of a module. Guess the crawl bots doesnt read long enough in the code until the text from the module comes.

Also the module will appear on each product in that category as well meaning that i will have duplicate text/content issues and the text is not unique.

anderssonh

Quote from: Studio 42 on January 31, 2017, 23:59:16 PM
In Vm you have short desc and description, in Joomla you have only description and readmore to split it.
YOu can display short desc in the cateogry list in most of templates., if you want you can display description in the category on adding some code and hide it.
But you must know that Google check the CSS and hidden display is removed from SEO search rank calculation, as i know.

Thanks for your response, if it is correct that Google will look for the read more css and rank down it is a problem of course. I need to look in to that, thanks for pointing out the risk.

Do you know where i can find that code? We have tried some different solutions but nothing has done the trick so far...

Studio 42

<?php echo $product->product_desc ?> display it in the products loop in the sublayout/products.php

anderssonh

Quote from: Studio 42 on February 01, 2017, 18:23:13 PM
<?php echo $product->product_desc ?> display it in the products loop in the sublayout/products.php

Sorry for being retarded but what will this do?

lindapowers

Quote from: anderssonh on February 01, 2017, 13:19:33 PM


Also the module will appear on each product in that category as well meaning that i will have duplicate text/content issues and the text is not unique.

I have one hidden menu item for each category and the modules assigned only appear in the category not in the product details view so no issues about duplicated content.
I think the key there is having the menu items per category created which give more flexibility.

anderssonh

Quote from: lindapowers on February 01, 2017, 19:13:07 PM
Quote from: anderssonh on February 01, 2017, 13:19:33 PM


Also the module will appear on each product in that category as well meaning that i will have duplicate text/content issues and the text is not unique.

I have one hidden menu item for each category and the modules assigned only appear in the category not in the product details view so no issues about duplicated content.
I think the key there is having the menu items per category created which give more flexibility.

That is a good idea, how do you do the hidden menu item and where is it placed in the following scenarion:

Menu Tree:

-> Main product category (placeholder)
--> Category page (virtuemart category)

On --> i would like the module to come up but not in the actual products.

Sorry for being slow... Thanks for your effort, it is appreciated!



lindapowers

#10
Quote from: anderssonh on February 01, 2017, 19:39:30 PM
Quote from: lindapowers on February 01, 2017, 19:13:07 PM
Quote from: anderssonh on February 01, 2017, 13:19:33 PM


Also the module will appear on each product in that category as well meaning that i will have duplicate text/content issues and the text is not unique.

I have one hidden menu item for each category and the modules assigned only appear in the category not in the product details view so no issues about duplicated content.
I think the key there is having the menu items per category created which give more flexibility.

That is a good idea, how do you do the hidden menu item and where is it placed in the following scenarion:

Menu Tree:

-> Main product category (placeholder)
--> Category page (virtuemart category)

On --> i would like the module to come up but not in the actual products.

Sorry for being slow... Thanks for your effort, it is appreciated!




For the hidden menu in joomla just google it, you have many tutorials.

Not sure I understand your menu tree.

Our structure:

Main Menu:
VirtueMart » Category Layout "Top Level Category" This acts as the frontpage.

Hidden Menu:
VirtueMart » Category Layout "Category 1"
VirtueMart » Category Layout "Category 2"
VirtueMart » Category Layout "Category 3"
etc

For the main structure just create a menu item of type VM category with "Top level category" to act as the frontpage.
NOTE: Do not use the menu type "VM frontpage" that is deprecated and could cause conflicts with ajax etc.

Then in a hidden menu create each category instead of selecting "top level category" in the menu item you select each concrete category.

What is important in your VM SEO settings is that you don't click "Use full category tree for product links" so you dont use the category in the URL cause if you do, the module will appear in your product details view too.

Actually we have unchecked all the VM SEO settings and those settings makes the module only show in the category.

This is what works for us currently and by no means is the correct way to do it, but.. for us does the job.

Regards


Studio 42

A little hint, manu, WHen i need to not render a module in the product details.
I use a module position only for this case and check for the ($view === 'category) or check for  ($view !== 'productdetails')  and if you need to be sure for ($option==='virtuemart')
$option and $view are of course from jinput.
Not that in some framework (wrap or t3), it's hard to do, because the render are done inside a function and not Joomla system.
Of course you can do more advanced think, but this permit to not have to check about the menu itemID and is very simpler to do 2 different render in product details and in category(or any other component or view).

lindapowers