"Social" buttons on the product sheet

Phoca Cart - complex e-commerce extension
User avatar
Robx61
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 29 Dec 2021, 14:12

"Social" buttons on the product sheet

Post by Robx61 »

Good morning. I wanted to insert "social" buttons directly on the cards of all the products. In which file should I enter the code that makes the "social" buttons appear? :o

Thank you
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Social" buttons on the product sheet

Post by Jan »

Hi, for this I would use a module or plugin. Depend on module options but maybe some have options to display the buttons only on specific view. Or you can use some plugin and paste it to description (long description). It accepts content plugins so such plugin will display the buttons.

Jan
If you find Phoca extensions useful, please support the project
User avatar
Robx61
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 29 Dec 2021, 14:12

Re: "Social" buttons on the product sheet

Post by Robx61 »

Thanks Jan, but that's not exactly what I want.
With modules or plugins add social buttons to joomla and her templates. I, on the other hand, have some code that hooks the social network starting from the specific product sheets. The user browses the catalog on my site and in each product he finds the button that publishes the content of the card directly on the social network in his account. Ex. Product sheet 001-image 001- Price € xx in social media product 001 will appear - image 001 ...
My problem is that I have no idea what file the Phoca Cart card containing all the references to the card itself produces. (id> image> productor> availability> format> color> Price = Product)
Maybe you have a plugin that adds social buttons to the card that returns the product?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Social" buttons on the product sheet

Post by Jan »

Hi, I think, standard content plugins should do the trick, you can just paste them to description of the product and they should create url to such product page. :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 389
Joined: 07 Nov 2018, 14:55

Re: "Social" buttons on the product sheet

Post by Nidzo »

I use ochJSsocials plugin for Joomla.
Create module jssocial and place ochJSsocials plugin code and enable Prepare content.
Create template override of com_phocacart>item
Place code in default.php (I placed it after line 552):
echo '<div class="ph-cb">{module jssocials}</div>';

You can achieve same result with any social share module and Joomla load module function or Modules anywhere plugin.
User avatar
Robx61
Phoca Enthusiast
Phoca Enthusiast
Posts: 64
Joined: 29 Dec 2021, 14:12

Re: "Social" buttons on the product sheet

Post by Robx61 »

Thank you Nidzo ... Sorry but your answer is not very clear ...
User avatar
Nidzo
Phoca Professional
Phoca Professional
Posts: 389
Joined: 07 Nov 2018, 14:55

Re: "Social" buttons on the product sheet

Post by Nidzo »

For example install AddToAny social share module.
https://extensions.joomla.org/extension ... e-buttons/

Publish module. Install Modules anywhere by Regular labs or use Joomla load module option.

Create template override of com_phocacart>item
Place code below in default.php (it is placed in /templates/[your template]/html/com_phocacart/item/):

echo '<div class="ph-cb">{module AddToAny}</div>';

[Image

Result is:
Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: "Social" buttons on the product sheet

Post by Jan »

Hi Nidzo, thank you for the guide.

Jan
If you find Phoca extensions useful, please support the project
Post Reply