Default external link

Phoca Cart - complex e-commerce extension
Matze396
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 23 Jul 2020, 16:04

Default external link

Post 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 :)

Tags:
Matze396
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 23 Jul 2020, 16:04

Re: Default external link

Post by Matze396 »

Can anybody help me?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Default external link

Post by Jan »

Hi, for now there is no such feature, so this needs to be customized directly in php code :-(

Jan
If you find Phoca extensions useful, please support the project
Matze396
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 23 Jul 2020, 16:04

Re: Default external link

Post 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?
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Default external link

Post 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:

Image

Then this value will be pre-filled when editing products

Jan
If you find Phoca extensions useful, please support the project
Matze396
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 23 Jul 2020, 16:04

Re: Default external link

Post 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>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Default external link

Post 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.
If you find Phoca extensions useful, please support the project
Matze396
Phoca Newbie
Phoca Newbie
Posts: 5
Joined: 23 Jul 2020, 16:04

Re: Default external link

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Default external link

Post by Jan »

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