[feature added] Full instead of short description

More
8 years 1 week ago - 7 years 9 months ago #32029 by evangus
Hi,

how to show the product full description instead of short one ?

I downloaded the plugin two days ago.

Joomla 3.4.8
VM 3.0.12

thanks
Last edit: 7 years 9 months ago by nordmograph.

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #32030 by nordmograph
Hi,

Yes, in plugins/content/vm2share/vm2share/php
You can comment out line 97 & 98
Code:
//$prod_desc = $prod_data[0]; //if($prod_desc=='') $prod_desc = $prod_data[1];

So only $prod_desc = $prod_data[1]; is active.
$prod_data[1] is the full description.
It is also chosen by default if short description is empty.

Hope it helps. Let me know

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #32032 by evangus
It works and it shows the full description but only once. The second product share shows the short description again.

i tried clearing all cache and browser also but nothing.

Any ideas ?

Please Log in or Create an account to join the conversation.

More
8 years 1 week ago #32037 by nordmograph
Are you looking at the page soure code or at the Facebook share thing / open graph ?
To test use
developers.facebook.com/tools/debug/
and make sure you click the fetch new info button after testing, so FB renews its cahced info.

Let me know if this is solved.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago - 7 years 11 months ago #32898 by evangus
i commented the lines as you said but it didn't work.
Code:
//$prod_desc = $prod_data[0]; //if($prod_desc=='') $prod_desc = $prod_data[1];
i managed to make it work by changing product_s_desc to product_desc in components/com_virtuemart/views/productdetails/view.html.php

but after the latest VM update it doesn't work and it shows inside description the following code
Code:
(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id))

I solved it by adding strip_tags in og description
Code:
$doc->addCustomTag('<meta property="og:description" content="'.strip_tags($prod_desc).'"/>');
Last edit: 7 years 11 months ago by evangus.

Please Log in or Create an account to join the conversation.

More
7 years 11 months ago #32899 by nordmograph
Hi

I'm not sure if the latst VM update changed anything about it. Still working as before on here.
If you use the product description instead of the short description, you must make sure no html tag is kept.

I'll provide you with an update where you can choose to use short or full decription. hold on a sec.

- Need help? Post the URL of the related page (eventualy as confidential info), it will help solve your issue faster.
- An error, notice or warning? report the exact message including the line number
- If you get a white page , enable error reporting and / or check your server error logs.

Please Log in or Create an account to join the conversation.

Time to create page: 0.338 seconds
Powered by Kunena Forum
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.