Author Topic: Link Call to Order to specific URL - Not contact page  (Read 320 times)

Offline starfish777

  • Newbie
  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
Link Call to Order to specific URL - Not contact page
« on: December 18, 2017, 09:43:26 PM »
I'm trying to figure out how to link the Call to Order icon on the Product listings page to a specific url NOT the contact page.

When you click on a category you are taken to a catalog list of items of items. Let's say one of the items is a Call to Order item (instead of a regular cart item).  I would like the "phone" icon to click to a specific URL outside of the website that host all services.

I have changed the icon in the /Storefront/view/default/template/pages/product/product_listing.tpl  to the calendar icon because I want the customer to be able to book reservations instead of calling.  In this file, the icon has the "#" hastag in the <a href>.  However, even when I change that hashtag to a specific URL, clicking on the icon in the catalog (Product listing page) still sends me to the contact page.

See attachment...

I was looking for the way to redirect the url in the System --> Localization --> Language Definitions. 

But so far, no luck. 

Any help would be greatly appreciated.

Thanks in advance.
« Last Edit: December 18, 2017, 10:22:22 PM by starfish777 »

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 1712
  • Karma: +227/-10
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: Link Call to Order to specific URL - Not contact page
« Reply #1 on: December 19, 2017, 05:54:46 AM »
You can find URL in public_html/storefront/controller/common/head.php line 87.
You can try edit it manually, but it will be overridden by upgrade process.
Right way to use hook (of your custom extension).
for example

Code: [Select]
public function onControllerCommonHead_UpdateData() {
     $this->baseObject->view->assign( 'call_to_order_url', $this->baseObject->html->getURL('your/route') );
}
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

Offline starfish777

  • Newbie
  • *
  • Posts: 12
  • Karma: +4/-0
    • View Profile
Re: Link Call to Order to specific URL - Not contact page
« Reply #2 on: December 19, 2017, 10:56:24 PM »
Thank you so much abolabo.  For right now I will do the temporary fix. But I'm relatively new to AbanteCart and will have to research how to work with doing custom extensions in AbanteCart. Already it's Light Years better than Magento in my opinion.

Thanks again!

 

LoliPromDress.com Prom dresses 2018