Hiển thị giá: liên hệ cho opencart

Posted by admin 07/11/2015 4 Comment(s) Thủ thuật,

Khi mình làm web thì thấy một điều bất cập đó là không phải khách hàng nào họ cũng điền giá cho sản phẩm của họ, mà khi đó họ lại muốn hiển thị giá: liên hệ hoặc là miễn phí. Vậy để Hiển thị giá: liên hệ cho opencart ta làm như nào? Bài viết này sẽ hướng dẫn cho các bạn cách làm điều đó.

 

 

Bạn vào file:  system/library/currency.php

Tìm đến dòng 74, bạn sẽ thấy đoạn:

$string = '';

Bạn chèn vào đằng trước nó đoạn code như sau:

if ($format && (float)$value == 0) {
            return 'Liên hệ';
          }

Sau đó lưu lại là ok.

4 Comment(s)

AbWBLmMq:
18/10/2024, 04:02:32 AM, www.example.com
Reply

1

Terri Martinez:
03/10/2025, 09:50:28 PM, levited.com
Reply

Ahaa, its pleasant dialogue about this article at this place at this website, I have read all that, so now me also commenting here.

Craig Garcia:
07/10/2025, 12:33:07 AM, antibact.sbs
Reply

you're in reality a excellent webmaster. The site loading velocity is amazing. It sort of feels that you're doing any unique trick. Furthermore, The contents are masterwork. you've done a great job in this subject!

Craig Garcia:
07/10/2025, 03:51:46 AM, antibact.sbs
Reply

you're in reality a excellent webmaster. The site loading velocity is amazing. It sort of feels that you're doing any unique trick. Furthermore, The contents are masterwork. you've done a great job in this subject!

Write a Comment