can you please help me how to include PHP code into the cs-cart page to make tracking system to customer from our service center database.does my code is not secure to the database.
Not clear what you're trying to do here. It looks like you're retrieving a first/last name from another DB, then echoing the one id you've searched for as a table with a single row.
What is the problem you're trying to solve? My guess is there is a much easier way.
thank you poppedweb and tbirnseth for your interest to help me ,
i tried to put the code into {php} {/php}, but it dosent work .
tbirnseth -> it just test php query code and if its work inseide cs-cart page so i will write my exact query but the problem i can not make php query include cs-cart , so the question is how .
thank you poppedweb and tbirnseth for your interest to help me ,
i tried to put the code into {php} {/php}, but it dosent work .
tbirnseth -> it just test php query code and if its work inseide cs-cart page so i will write my exact query but the problem i can not make php query include cs-cart , so the question is how .
Hello!
Please add queries in function or controller in app directory. If you created a page, then you should have controller for it. It is not correct to write queries in templates.
The "best practices" way of doing it would be to have your controller do the query and then have it put the results in a smarty variable and use it within the templates.
Tony, is get_info.php just a made up example? or would it actually work?
Meaning, how would this file be called when CS-Cart is loading? My understanding is that you are limited with what's put under app/controllers/ and you can only do pre, post or override to these files. Am I wrong?
Tony, is get_info.php just a made up example? or would it actually work?
Meaning, how would this file be called when CS-Cart is loading? My understanding is that you are limited with what's put under app/controllers/ and you can only do pre, post or override to these files. Am I wrong?
categories.php
checkout.php
companies.php
customization.php
index.php
init.php
orders.php
pages.php
product_features.php
products.php
profiles.php
promotions.php
robots.php
search.php
sitemap.php
theme_editor.php
xml_feeds.php
Hello!
You can create your own pages by adding new controller in your add-on and template for this new controller.
Tony, is get_info.php just a made up example? or would it actually work?
Meaning, how would this file be called when CS-Cart is loading? My understanding is that you are limited with what's put under app/controllers/ and you can only do pre, post or override to these files. Am I wrong?
If you want to call this code on all pages, use the init.post.php file which is called for all available controllers
Oleg and eComlabs, thanks for very useful comments. Is there a documentation on this in development guide? I looked it up but I couldn't find it. I'm very confused and left out with the way CS-Cart can be extended.
Read about addons. You are asking questions about the architecture that is pretty clearly spelled out in the documentation. I never mentioned anything about app/controllers. I mentioned using an addon (app/addons/my_changes/controllers/frontend). Once you understand how addons and other controllers (addons are just a controller) work, this will all make sense.
'get_info' is the "mode" for the my_changes controller you would be creating. Using this 'mode' would mean that it would utilize a get_info.tpl template located in the directory design/themes/[YOUR THEME]/templates/addons/my_changes/ which I referenced above.
Tony, is get_info.php just a made up example? or would it actually work?
Meaning, how would this file be called when CS-Cart is loading? My understanding is that you are limited with what's put under app/controllers/ and you can only do pre, post or override to these files. Am I wrong?
Oleg and eComlabs, thanks for very useful comments. Is there a documentation on this in development guide? I looked it up but I couldn't find it. I'm very confused and left out with the way CS-Cart can be extended.