php - Opencart theme is showing error after install on localhost but working good on existing site?
Get the solution ↓↓↓I have installed a fresh Opencart file. Now I have used a theme which client has sent to me. When I installed the theme it showed an error asNotice: Undefined variable: text_items_no in Opencart/catalog/view/theme/epura/template/module/cart.tpl on line 1 item.
Now I thought there might be an error with the theme but when I visited the site where the theme has been activated there was no error. So can someone tell me what I am missing here?
NOTE I am using the same versionf Opencart which the theme has been activated in the live site and also on my localhost.
Answer
Solution:
Actually, there is no error in your theme integration. You are missing a single variable to initiate via the controller of cart module that is text_items_no, probably used for showing the number of items in text version.
so in the catalog/controller/module/cart.php initiated this variable and the notice will be removed.
Thanks.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: apache/2.4.52 (win64) openssl/1.1.1m php/8.1.2 server at localhost port 80
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.