So I am trying to set up a site on my localhost. I have selected 2 payment gateways from admin end
Now I have customized all the rules for them. I only need one more rule.
I wish to have a functionality wherein I can enter some pincode/postcode values (through admin panel or maybe in some array in a javascript file or directly into the database, does not matter) of locations where second method is available)
Whenever someone presses continue before confirming order, the checkout form is validated so as to check from the form data if the value entered in post code matches the data (from any of the above methods) and if yes, only then they can continue or I wish to show an error message that
Following payment gateway is not available in your location
If you give me a hint on how to proceed with this, perhaps, I might be able to take it further. I am a bit or a starter in opencart so not much idea about how to proceed. I have sound knowledge of PHP, JQuery and Javascript although. So any and all help will be appreciated.
答案 0 :(得分:0)
我暂时用JQuery管理它。在catalog-> view-> theme-> ancart(主题名称) - >购物车文件夹中的cart.tpl文件中编辑了提交功能。
使用名为" Zipcode COD"输入zipcodes。编辑了JQuery隐藏和显示付款选项的响应。
很多硬编码但是诀窍。如果有人需要,我会发布代码。
答案 1 :(得分:0)
已经存在一些不同的扩展来执行您想要的操作 - 允许您按照各种标准限制送货方式。这是我个人的最爱:http://www.opencart.com/index.php?route=extension/extension/info&extension_id=1614