Elxis CMS Forum

Extensions => Bots and plugins => Topic started by: sophocles on September 20, 2012, 18:21:29

Title: Eforms & Eshop (SOLVED)
Post by: sophocles on September 20, 2012, 18:21:29
Hi,

I tried to enter into an eshop product the eform "tag" --> {eforms}samplecontact{/eforms}, but the bot does not come alive.
When i enter the same line into a content item of the elxis web site, the form is there as it had to.

Does anyone knows what is needed for an eform to function within an eshop product?

Thanks in advance
Title: Re: Eforms & Eshop [solved]
Post by: sophocles on September 21, 2012, 16:18:51
Just found that there is an option that enables the "bots" in eshop and everything is OK.
Title: Re: Eforms & Eshop
Post by: webgift on September 21, 2012, 16:22:23
 :) I have already started replying to you. Great!
Title: Re: Eforms & Eshop
Post by: sophocles on September 21, 2012, 19:19:01
Then it was your reply that sparked me in order to find it  ;)
Thanks.
Title: Re: Eforms & Eshop
Post by: webgift on September 21, 2012, 21:48:26
 :) :) ;)
Title: Re: Eforms & Eshop (Reopened)
Post by: sophocles on September 26, 2012, 12:06:11
I have installed my eform inside an eshop product, and everything looks fine until i submit it.
I get a 404 error and no messages are being send.
When i enter the same form inside a content item of the elxis site (not an eshop product) everything works fine; e-mail is send to company's email address, a copy to the sender as well as the confirmation that it was successful.

Any idea of where is the problem?
Title: Re: Eforms & Eshop (Reopened)
Post by: datahell on September 26, 2012, 14:23:13
eForm has been developed for usage in content items.
You need to modify the form's action in order to work of IOS Eshop products.
Title: Re: Eforms & Eshop (Reopened)
Post by: sophocles on September 26, 2012, 14:55:25
I see, Any hint on the type of modification?
Title: Re: Eforms & Eshop (Reopened)
Post by: datahell on September 26, 2012, 17:54:51
Open file mambots/content/eforms.php
Go to line 175
change this:
global $Itemid, $mainframe;

if ($aurl == 1) {
   return sefRelToAbs('index.php?option=com_content&task=view&id='.$this->articleid.'&Itemid='.$Itemid);
} else {
   if ($mainframe->getCfg('sef') == 2) {
      return sefRelToAbs('index.php?option=com_content&task=view&id='.$this->articleid.'&Itemid='.$Itemid);
   } else {
      return 'index.php';
   }
}

to this:
global $Itemid, $mainframe, $option;

if ($option == 'com_eshop') {
   $link = sefRelToAbs('index.php?option=com_eshop&task=view&id='.$this->articleid.'&Itemid='.$Itemid);
} else {
   $link = sefRelToAbs('index.php?option=com_content&task=view&id='.$this->articleid.'&Itemid='.$Itemid);
}

if ($mainframe->getCfg('sef') <> 2) { $link = $mainframe->getCfg('live_site').'/'.$link; }
return $link;
}
Title: Re: Eforms & Eshop (SOLVED)
Post by: sophocles on September 26, 2012, 20:35:18
If only you had a cent for every "thanks" you've received....

Thank you. :o
Title: Re: Eforms & Eshop (SOLVED)
Post by: datahell on September 28, 2012, 09:47:41
My cents are the satisfaction I feel for happy users ;)