Page 1 of 1
Default external link
Posted: 23 Jul 2020, 16:09
by Matze396
Hey,
i am using phoca cart only as a product gallery, so i didnt need the cart itsself.
Instead of the "Add to Cart" button i am using the button with the external link. Is it possible to set a default link-value for it? It would be easier for me, because it`s the same in 99% of the use-cases.
Best wishes,
Matze :)
Re: Default external link
Posted: 27 Jul 2020, 10:25
by Matze396
Can anybody help me?
Re: Default external link
Posted: 27 Jul 2020, 21:38
by Jan
Hi, for now there is no such feature, so this needs to be customized directly in php code
Jan
Re: Default external link
Posted: 02 Aug 2020, 12:51
by Matze396
Jan wrote: ↑27 Jul 2020, 21:38
Hi, for now there is no such feature, so this needs to be customized directly in php code :-(
Jan
Thanks a lot Jan. Can you tell me in which php codefile i can find this features?
Re: Default external link
Posted: 03 Aug 2020, 14:14
by Jan
Hi, you can set default values in XML:
administrator\components\com_phocacart\models\forms\phocacartitem.xml
E.g. on line 25, set default attribute:
Then this value will be pre-filled when editing products
Jan
Re: Default external link
Posted: 04 Aug 2020, 14:23
by Matze396
Thanks!
I can find the folder but not the phocacartitem.xml.
There is only a file for submit, checkout,...
Can i add the file manually - like that:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<form>
<field name="external_link" type="text" class="inputbox" default="www.google.de" size="40" label="COM_PHOCACART_FIELD_EXTERNAL_LINK_LABEL" description="COM_PHOCACART_FIELD_EXTERNAL_LINK_DESC"/>
</form>
Re: Default external link
Posted: 05 Aug 2020, 12:37
by Jan
Hi, it is a core file and without it you will be not able to edit products in administration. So the file needs to be there.
Re: Default external link
Posted: 05 Aug 2020, 21:56
by Matze396
Thanks a lot Jan! It works!
It was my fault...i searched in the main component folder and not in administrator/component.
Topic is finished!
Re: Default external link
Posted: 11 Aug 2020, 16:57
by Jan
Ok