Author Topic: Link in shopper field 'field title'  (Read 270 times)

biltong

  • Jr. Member
  • **
  • Posts: 124
    • Starfish Websites
Link in shopper field 'field title'
« on: July 06, 2018, 17:00:47 pm »
Hi, does anybody know how to do this?

I have a checkbox field on the checkout page (additional to the TOS one) and want some or all of the 'field title' text to link to an article loaded in a modal popup.

Thanks

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1665
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Link in shopper field 'field title'
« Reply #1 on: July 06, 2018, 21:52:30 pm »
I have something similar in my sign up for a newsletter module. The text for the field (checkbox in my case) is simply a link like this:
Code: [Select]
<a href="/index.php?option=com_content&amp;view=article&amp;id=999&amp;Itemid=999" target="_blank">I accept the GDPR policy.</a>
This redirects to another page but there may be other better solutions.

Jorgen @ Kreativ Fotografi
Joomla 3.8.3
Virtuemart 3.2.12
Olympiantheme Hera (customized)

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 7994
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 2.6.22 & 3.2.14
Re: Link in shopper field 'field title'
« Reply #2 on: July 06, 2018, 23:48:43 pm »
check how the TOS is done:  components\com_virtuemart\sublayouts\tos.php
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

biltong

  • Jr. Member
  • **
  • Posts: 124
    • Starfish Websites
Re: Link in shopper field 'field title'
« Reply #3 on: July 09, 2018, 17:28:01 pm »
check how the TOS is done:  components\com_virtuemart\sublayouts\tos.php

I did find that code but backed out, looked too complicated to work out how the form finds this code as I'm not fluent at a developer level. Was hoping for something simpler - thanks for the reply.

biltong

  • Jr. Member
  • **
  • Posts: 124
    • Starfish Websites
Re: Link in shopper field 'field title'
« Reply #4 on: July 09, 2018, 17:30:15 pm »
I have something similar in my sign up for a newsletter module. The text for the field (checkbox in my case) is simply a link like this:
Code: [Select]
<a href="/index.php?option=com_content&amp;view=article&amp;id=999&amp;Itemid=999" target="_blank">I accept the GDPR policy.</a>
This redirects to another page but there may be other better solutions.

Jorgen @ Kreativ Fotografi

Thanks for the reply. I would also normally do it that way but this doesn't work with checkbox fields on the VirtueMart Account Maintenance. There's some trickery going on that is above my technical level.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 1665
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Link in shopper field 'field title'
« Reply #5 on: July 09, 2018, 18:27:24 pm »
Hello, You are right, I stole this example from Mavros Xristoforos who uses it in his checkboxes. Vm does seem to filter out an doesn´t recognize html in the field title. Sorry no ideas other than taing on the tos.php.

regards

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