Author Topic: downloadable product file for registered users  (Read 354 times)

2cool

  • Jr. Member
  • **
  • Posts: 201
downloadable product file for registered users
« on: March 11, 2019, 20:27:34 pm »
Hi,
Is is possible to create a downloadable file on product detail page for registered users.
Can this be done with basic special field option and choose shoppergroup?
And how can I add a .step file, did add extention and mime but still not working...

Joomla! 3.9.3 + VirtueMart 3.4.2
 
Thanks and regards,
Pas

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: downloadable product file for registered users
« Reply #1 on: March 11, 2019, 22:58:15 pm »
custom text field with the url -- display as url and hide if not registered by std. Joomla user snippet

$user = JFactory::getUser();
$userid = $user->get('id');
if($userid > 0{
// show the custom field
}

GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

2cool

  • Jr. Member
  • **
  • Posts: 201
Re: downloadable product file for registered users
« Reply #2 on: March 12, 2019, 21:56:52 pm »
Thanks,

Should I create a new special field (textarea) ?
Sorry not clear how to set this up...

Regards,
Pas

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 8834
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: downloadable product file for registered users
« Reply #3 on: March 12, 2019, 22:46:53 pm »
normal custom text field .. render it out in the templates as a url
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3720
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: downloadable product file for registered users
« Reply #4 on: March 12, 2019, 23:42:37 pm »
You cna use my customfield shortcodes See https://shop.st42.fr/en/products/shortcodes.htm
You have an option to render each customfields per shopper group(s)
See https://shop.st42.fr/en/shorcodes-english-doc#url
You can set an icon and many other options.
Note that the plugin provide 18 type of fields currently.

2cool

  • Jr. Member
  • **
  • Posts: 201
Re: downloadable product file for registered users
« Reply #5 on: April 02, 2019, 12:32:47 pm »
Sorry for my late response..

I create a custom field but can't choose 'Custom Group' ? This should be set to registered.
Would be nice to have this option to 'add' a downloadable file to some of our products,
and only show this for registered uses (group).

Maybe I did choose a wrong field?

Attached my setup.

Thanks,
Pas

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2048
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: downloadable product file for registered users
« Reply #6 on: April 02, 2019, 12:48:26 pm »
You can group a number of custom fields together if You like, and they can be placed together in a product layout.

Has nothing to do with user VM or Joomla groups.

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

2cool

  • Jr. Member
  • **
  • Posts: 201
Re: downloadable product file for registered users
« Reply #7 on: April 02, 2019, 13:23:00 pm »
Hi Jörgen,

Sorry but it's still not clear to me ;(
How can I add a custom field which I can use for some products and is visible for registered user only?
Where can I set the usergroup for this? Could you explain this or is there any info available.

Regards,
Pas

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2048
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: downloadable product file for registered users
« Reply #8 on: April 02, 2019, 14:01:30 pm »
custom text field with the url -- display as url and hide if not registered by std. Joomla user snippet

$user = JFactory::getUser();
$userid = $user->get('id');
if($userid > 0{
// show the custom field
}



There is no core function at user level ready for this.

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

2cool

  • Jr. Member
  • **
  • Posts: 201
Re: downloadable product file for registered users
« Reply #9 on: April 02, 2019, 15:07:25 pm »
Where should this be set?
Could you add a simple screen where this is added...
I have 300+ products, should I add every url in each product?

Thanks,
Pas

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2048
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: downloadable product file for registered users
« Reply #10 on: April 02, 2019, 15:17:57 pm »
No this is probably to be done in the productdetails or maybe categories override:

/templates/your template/html/com_virtuemart/productdetails/default.php

Jörgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

2cool

  • Jr. Member
  • **
  • Posts: 201
Re: downloadable product file for registered users
« Reply #11 on: April 02, 2019, 16:14:10 pm »
Thanks Jörgen,

But it's totally unclear to me if this can be used as a custom field in vm products.
It should be usable for any product with any file attached.

Hope anyone can explain how this can be done or if some plugin has this options.

Thanks,
Pas