- Posts: 41
- Thank you received: 0
Contact us Button adds "administrator" into URL
13 years 9 months ago #82619
by gteigland
Contact us Button adds "administrator" into URL was created by gteigland
This is odd but when customers use the contact button and we receive the email it adds "admininstrator into the url"
For example from the email.
Link to the product page < www.furnitureandthings.com/administrator...mp;task=edit&cid []=1223&Itemid=389>
You will notice that"administrator" therefore not allowing he user to access the view the product on the site by just clicking...
Could you at least point me to the file that renders that url so I can take a look at it?
Thanks!
For example from the email.
Link to the product page < www.furnitureandthings.com/administrator...mp;task=edit&cid []=1223&Itemid=389>
You will notice that"administrator" therefore not allowing he user to access the view the product on the site by just clicking...
Could you at least point me to the file that renders that url so I can take a look at it?
Thanks!
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82717
by Xavier
Replied by Xavier on topic Contact us Button adds "administrator" into URL
This url is in the view "product / show_default" in HikaShop > Display > Views.
The code you are looking for is:
The code you are looking for is:
Code:
<div id="hikashop_product_contact_main" class="hikashop_product_contact_main">
<?php
$contact = $this->config->get('product_contact',0);
if (hikashop_level(1) && ($contact == 2 || ($contact == 1 && !empty ($this->element->product_contact)))) {
$empty = '';
$params = new HikaParameter($empty);
echo $this->cart->displayButton(JText :: _('CONTACT_US_FOR_INFO'), 'contact_us', $params, hikashop_completeLink('product&task=contact&cid=' . $this->row->product_id), 'window.location=\'' . hikashop_completeLink('product&task=contact&cid=' . $this->row->product_id) . '\';return false;');
}
?>
</div>
Please Log in or Create an account to join the conversation.
13 years 9 months ago #83043
by gteigland
Replied by gteigland on topic Contact us Button adds "administrator" into URL
Unfortunately I can't figure this out. The code is the same but when I use the contact button and receive the email it adds /administrator/ in the url after the domain ie. .com... So the link is not valid within the email.
Any ideas of how to fix this?
Any ideas of how to fix this?
Please Log in or Create an account to join the conversation.
13 years 9 months ago #83233
by nicolas
Replied by nicolas on topic Contact us Button adds "administrator" into URL
Since you're the administrator of the shop you should be able to access the link of the contact email.
That should not be a problem.
If you want to change the link in the contact email, you need to edit the contact email via the menu System->Emails and change the link there:
$url = JRoute::_('administrator/index.php?option=com_hikashop&ctrl=product&task=edit&cid[]='.$data->product->product_id.$url_itemid,false,true);
Maybe something like that:
$url = JRoute::_('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$data->product->product_id.$url_itemid,false,true);
That should not be a problem.
If you want to change the link in the contact email, you need to edit the contact email via the menu System->Emails and change the link there:
$url = JRoute::_('administrator/index.php?option=com_hikashop&ctrl=product&task=edit&cid[]='.$data->product->product_id.$url_itemid,false,true);
Maybe something like that:
$url = JRoute::_('index.php?option=com_hikashop&ctrl=product&task=show&cid='.$data->product->product_id.$url_itemid,false,true);
Please Log in or Create an account to join the conversation.
13 years 8 months ago #83552
by gteigland
Replied by gteigland on topic Contact us Button adds "administrator" into URL
Thanks very helpful. Almost there just one little issue.
It adds "https" into the url. Usually that would be good with an e-commerce site but we're just using hikashop as a catalog to browse.
I can't figure out how to change the https to just regular http that shows up in the link of the email since we don't have an SSL certificate.
Thanks!
It adds "https" into the url. Usually that would be good with an e-commerce site but we're just using hikashop as a catalog to browse.
I can't figure out how to change the https to just regular http that shows up in the link of the email since we don't have an SSL certificate.
Thanks!
Please Log in or Create an account to join the conversation.
13 years 8 months ago #83555
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Contact us Button adds "administrator" into URL
Hi,
So you can just $url = str_replace('https://', 'http://', $url);, no ?
Regards,
So you can just $url = str_replace('https://', 'http://', $url);, no ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
13 years 8 months ago - 13 years 8 months ago #83560
by gteigland
Replied by gteigland on topic Contact us Button adds "administrator" into URL
I tried putting the code in but it didn't work. However you help realize how simple the solution really was. So in the string I just added
Thanks for your help!
Code:
http://sitedomain.com/
Thanks for your help!
Last edit: 13 years 8 months ago by Jerome. Reason: The submit on the forum left out "http://". Fixed by moderator
Please Log in or Create an account to join the conversation.
Time to create page: 0.205 seconds