Topic-icon Facebook Comment on Virtuemart product detail

Active Subscriptions:

None
9 years 9 months ago - 9 years 9 months ago #59433 by mrkavin
just purchased the JFBConect(7.0.3) and I don't know coding at all, but trying to look for where to insert the syntax {JFBCComments} in the source code.

1. I want to insert facebook comment just below the product product description, by the way, i am running Joomla 3.6.2 with virtuemart 3.0.17 (both latest version). Could you guide me where to insert the syntax

2. another thing is when I copy the url and insert into the facebook post, there is not image display in the facebook, just title and product description of virtuemart
Last edit: 9 years 9 months ago by mrkavin.
The topic has been locked.
Support Specialist
9 years 9 months ago - 9 years 9 months ago #59434 by mel

1. I want to insert facebook comment just below the product product description, by the way, i am running Joomla 3.6.2 with virtuemart 3.0.17 (both latest version). Could you guide me where to insert the syntax


[Edited to fix the path of VM file]
Virtuemart 3.x has changed their directory structure from previous versions. You will need to do a template override of /components/com_virtuemart/views/productdetails/tmpl/default.php. Copy that file to /templates/YOUR_TEMPLATE/html/com_virtuemart/productdetails/default.php and make your changes in the new file. The easy-tag can go anywhere in the page where normal HTML code can go. However, since you say you want it after the description, try placing it after this block.
<?php
    // Product Short Description
    if (!empty($this->product->product_s_desc)) {
	?>
        <div class="product-short-description">
	    <?php
	    /** @todo Test if content plugins modify the product description */
	    echo nl2br($this->product->product_s_desc);
	    ?>
        </div>
	<?php
    } // Product Short Description END
echo shopFunctionsF::renderVmSubLayout('customfields',array('product'=>$this->product,'position'=>'ontop'));
    ?>
{JFBCComments}

2. another thing is when I copy the url and insert into the facebook post, there is not image display in the facebook, just title and product description of virtuemart

To fix this, you should use the Open Graph tags to let Facebook know what image and description should be used for the FB wall posts. Adding the Open Graph description tag can be done by modifying the same template file as the above JFBCComments tag. When testing for the image, I chose to override a different template view file for the images. You can see the full tags/files to update at the Virtuemart documentation that I just updated for Virtuemart3. When figuring out the code for that documentation, I tested on a site with the newest V3, so let me know if you have any problems.

-Melissa
Last edit: 9 years 9 months ago by mel.
The topic has been locked.
Active Subscriptions:

None
9 years 9 months ago #59435 by mrkavin
Thank you for your fast reply, I have modified as describe in the box above and in the document, it didn't work and the directory structure of mine is quite different from your. Anyway, I modified this one:

/templates/template_name/html/com_virtuemart/productdetails/default.php
/templates/template_name/html/com_virtuemart/productdetails/default_images.php

I have attached 2 files which already modified. please see if they are in the correct line (Unfortunately, I can't upload attachment with txt, rar format)

my site is monster-gadget.com , it's still in testing and all data is dummy.
please advise
The topic has been locked.
Support Specialist
9 years 9 months ago #59436 by mel
Those files didn't come in correctly. The forum extension we're using on our site is a little finicky.

Are you using a different theme for Virtuemart than the standard setting? I haven't changed anything for our VM settings on my test site, so those file locations were the ones that worked for me in version 3.0.16. If you can't find the paths that I stated, then the override location would be incorrect. You'd have to pinpoint which files to change that have the product details view. If you can't narrow it down, you can PM me ftp credentials and a specific URL where I can see a valid product and I can take a look.

-Melissa
The topic has been locked.