AGB Link instead of Article

  • Posts: 4
  • Thank you received: 0
3 years 7 months ago #331420

-- HikaShop version -- : 4.4.1
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.14
-- Browser(s) name and version -- : Brave 1.21.76
-- Error-message(debug-mod must be tuned on) -- : -


Hello,

i'm stuck right now. I search for the Option to Link the AGB to a URL instead of an Article. The background is really simple. I using a external Joomla Plugin from a lawyer where the AGB is updated automatically. This Plugin always get the latest version of the AGB. The plugin itself provides a link to the AGB. The link is not external. For example https://mywebsite***.de/index.php?option=com_it-recht-kanzlei&type=agb . Now i want that this link is opened instead of an Article... How can i achieve that? Is there any chance or an alternate way?

Thank you for any help!

Kind regards :)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331422

Hi,

You have two options:
1. you edit the file show_block_terms via the menu Display>Views and change the line:

JRoute::_('index.php?option=com_hikashop&ctrl=checkout&task=termsandconditions&step='.$this->step.'&pos='.$this->module_position.'&tmpl=component'),
to:
'https://mywebsite***.de/index.php?option=com_it-recht-kanzlei&type=agb&tmpl=component'),

2. You install that extension extensions.joomla.org/extension/components-anywhere/ in order to have in a joomla article the tag corresponding to your com_it-recht-kanzlei component and then select that article in the Terms & Conditions view of your checkout workflow.

The advantages of the first solution are that it's more lightweight, you don't have to add an extra extension just for that, and should not need any update for the foreseeable future.
The advantages of the second solution are that this will work far into the future, even if we change the checkout code a lot, without you having to change your view override and you can have several terms and conditions views in your checkout linked to different joomla articles (the first solution will always display the link you entered in hard in the view override code).

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

  • Posts: 4
  • Thank you received: 0
3 years 7 months ago #331436

Hello Nicolas,

thank you for your help. I tried the second solution. Looked more future proof. I installed, created an article, pasted the code in the article (checked if component is active) and linked the component as described on components page. Unfortunally the PopUp is empty... I checked with HTML inspector, the component is loaded but the content not... if i directly load the link, the AGB is shown!? But not loaded into the popup... any ideas why this happens?

Thank you :)

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331442

Hi,

I don't know. I would need to access the checkout and look at the situation to be able to say more.
Could you provide the necessary URL and instructions for that ?

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

  • Posts: 4
  • Thank you received: 0
3 years 7 months ago #331446

Hi Nicolas,

sure. The link is jkw.jkwhilden.de/index.php/produkte

To go to the AGB just add a product to the Cart and go to it over the right side. It's little bit hidden yet as im still testing :)

I moved the AGB to the top for faster testing.

Edit - the Link to the AGB: jkw.jkwhilden.de/index.php?option=com_it-recht-kanzlei&type=agb

Thank you :)

Last edit: 3 years 7 months ago by Ralf Jenniches.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331447

Hi,

From what I can see in the popup, components anywhere is triggered in the popup.
So I would say that there is a problem with the tag itself.
What tag are you using ?
Or maybe there is an issue in that com_it-recht-kanzlei component which doesn't output anything when components anywhere requests the content of the page for some reason.
In any case the issue here is between components anywhere and com_it-recht-kanzlei so not much I can do to help as I don't know how both work.

Worst case, you can go with solution 1.

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

  • Posts: 4
  • Thank you received: 0
3 years 7 months ago #331460

The tag i use is {component url="index.php?option=com_it-recht-kanzlei&type=agb"} as declared on the components site. I tried disable SEF, use different PopUp mode, changed the tag a few times but nothing worked so far. Maybe the anywhere component is broken. I'll try a few times more... maybe i get it to work.

Thanks for your time!

Edit: Found out - it comes from the com_it-recht-kanzlei component. Seems it does not work with components anywhere. Tried different component and that works out...

I'll investigate to find out why... if i found anything i'll let you know. Thanks.

Last edit: 3 years 7 months ago by Ralf Jenniches. Reason: additional information

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
3 years 7 months ago #331461

Hi,

You might want to report the issue to the developer of components anywhere.
Maybe something can be done to support dashes in the component name.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum