Author Topic: Version 1.2.13 Don't want to break my PHP, need Add2Cart hidden on $0.00 price.  (Read 227 times)

Offline peejaygee

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
I have a 3rd party company who provides my products, people pay me, I pay them, they ship, everything is great. AbanteCart works wonderful for that.

But, would like to also bring in my Amazon products, into the one central place, so I can display pictures, and I'm happy to make the description contain the link to the Amazon page, but I don't need someone trying to be smart and ordering something as the price will be 0.00 on AbanteCart. As Amazon obviously deals with the cost, shipping, etc, etc

I've searched google, and these forums and I found a post about changing the php code, to check if the price is 0.00 and not display, but this was from back in 2014 [http://forum.abantecart.com/index.php?topic=1568.0], so I'm worried that things have changed, code, etc, and I don't want to break anything. I'm good following instruction, happy using notepad++ and FTP, etc, just point me in the right direction.

Can anybody help me, or can AbanteCart even do this anymore. Or, even better, some other underlying options I'm missing that allows me to link to an offsite link within Amazon?

Thanks in advance for your advice and guidance.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3826
  • Karma: +185/-0
    • View Profile
Hi.
You can set your product to disallow ordering on your website. In this case button "call for order" will be shown for customers.

You can easily rename button in AbanteCart admin what left is change php code to assign some url (amazon url) to that button

http://demo.abantecart.com/index.php?rt=product/product&product_id=54
“Chuck Norris is so amazing.”
― Mother Teresa

Offline peejaygee

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Thank you for that, that should work. I'll put something like 'See Desc. Link' :)

Offline user88

  • Newbie
  • *
  • Posts: 45
  • Karma: +4/-0
    • View Profile
Since you're on this topic.

1. Which is the file that needs modified to change the url for the 'call to order' image?

2. Where do you remove the phone symbol of the 'call to order' button? I have looked everywhere without success. Perhaps the problem is I don't know what that image is called...

Thanks for your help

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3826
  • Karma: +185/-0
    • View Profile
"call to order" is not an image and you can edit almost any text in your AbanteCart admin.

https://abantecart.atlassian.net/wiki/spaces/AD/pages/15466660/Language+Definitions
“Chuck Norris is so amazing.”
― Mother Teresa

Offline user88

  • Newbie
  • *
  • Posts: 45
  • Karma: +4/-0
    • View Profile
Thanks, I know how to change language definitions.

The 'call to order' display has a little  phone image that shows on its left side. I have succeeded at changing the text but haven't been able to get rid of that phone image. How does one do this?

Also, where does one change the url associated with the 'call to order' display?

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3826
  • Karma: +185/-0
    • View Profile
You need next files
/htdocs/storefront/view/default/template/pages/product/product_listing.tpl
/htdocs/storefront/view/default/template/pages/product/product.tpl

Search for
Code: [Select]
text_call_to_order
« Last Edit: December 11, 2018, 11:58:46 PM by Basara »
“Chuck Norris is so amazing.”
― Mother Teresa

Offline user88

  • Newbie
  • *
  • Posts: 45
  • Karma: +4/-0
    • View Profile
Thanks. Something seems not working for me. I have a modified theme with a copy of the product.tpl and product_listing.tpl files in it.

I found the code in product_listing.tpl and made changes (you listed the same file twice?). No matter what, changes don't display. I cleared cache both in AbanteCart and my browser, forced reload of webpage and all the same.

Then changed name of product_listing.tpl and product.tpl files both for my theme and default them hoping something would break, cleared cache again and reloaded. Page still displays the same. And the 'call to order' displays the phone and the url on the product page.

Wonder what I might be missing to get this to work.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3826
  • Karma: +185/-0
    • View Profile
You should modify these files in active theme only. Please clear AbanteCart cache in admin
“Chuck Norris is so amazing.”
― Mother Teresa