-
using smarty in modular web development
hi , i previously design and program a web site that have a index page that require various modules as needed via switch statement assume that this is my index page so we have <?php require_once('includes/site.config.php'); //in config i have site wide setting , declaring objects , error handling , .... require_once('includes/header.inc.php'); ?> <!-- content , tables , images , etc ... goes here --> in main content center table i have this switch switch($_GET["section"]){ case 'register': require_once('modules/register.php'); break; case 'about': require_once('about.php'); break; case 'users_list': require_once('users_list.php'); break; case 'news' : require_once('modules/news.php'); break; case 'site_policy': require_once('site_policy.php'); break; case 'contact': require_once('modules/contact.php'); break; default: break; } <!-- after htmls include footer file --> <?php include('includes/footer.inc.php');?> now i learn smarty and i like to this web site have a template engine , the problem is i don't know how to assign this functionality to a tpl file plus in many place in the index page i have to add another section and it's just possible with switch for example : i have to require profile module and if this module called by user other modules like news , login, etc .. will be removed . so i use the following line of code : if($_GET['section'] == 'profile'){ //do this and require news or login .etc . }else{ require('path/to/profile.php'); } an screen shot of site structure here i think this task could be done like this $smarty ->assign("section" , $_GET['section'] ) ; //because the $_get super global return array $smarty ->display("index.tpl"); then use {foreach } , {if} and {ifelse} statement to determaind switch but i go thought many search but i can't find any professional programmer do such thing . so please let me know if there is a better solution to still writing entire web application in one file and use smarty with it , without using switch to determine section to require modules . Regards . Mehdi .
-
Design Category For Shopping System
ok , i have fix the database by adding one row to category table (parent_cat_id). now , i must show to admin a form to fill category table but how can i understand the admin add a category or subcategory ? and after that how can i retrieve this information from database and show the user as a category ?
-
Design Category For Shopping System
hi , I'm New on php , I want design a online sale for laptop , accessories and gaming console ok ? each of parent categories has a child for example : laptop >dell >sony >etc . and i also design the database nicely . you can see ERD herehttp://zarrinweb.com/htgroup/HT-group.png 1 - Let Me Know if my database design is normal and ok ? if not what's the problem . 2 - after define the category and also subcategory 2-1 : How can i determine it's Parent Category or child ? 2-2 : How Can I show that to user ? and after click on each parent categories Then Show childs . (like OSC ) Tanks For Helping .
-
fieldset border
tanks . but not working . just a #ccc assigned color shown .
-
payment module
ok , i grab enogh information what is the next step ?
-
fieldset border
hi , check the picture please . as you can see this field set has double border with different colors (it's on the login in this site ) how can i do that with css ?
-
oscommerce 2.2rc2a - PAYPAL express
yes , i don't use osc anymore too . i suggest a best and totaly free version of http://www.prestashop.com i think it's very complete . no more !!!
-
Which One?
all of them is nice , very nice background and colors . but i think if use a layout with few images that would be very nice and fast . and your footer and header font color not sharp and visible . i prefer the 3th . good luck .
-
payment module
hi , i want to add a payment module to a e commerce web site but i have no idea to design a payment module if anyone have exprince with this please help to learn how to do it . some question : 1- how a payment module works ? 2- how i can do some transaction with my payment module 3- what the algorithms does it use ? 4- is it unique for every single card like (credit or master ) ? tanks for help .
-
Is This a Open source ecommerce ?
this question because they are sold it as a commercial(none-open source) package however I'm sure they don't wrote that by themselves anyway , i can't really explain that in forum it's gonna be too long and hard to explain . tank you for the information
-
adobe air
yeah thanks . sounds like very usful but my country block this address for some damn reasons !!! could you please give me the book title to find it somwhere else please ?
-
Is This a Open source ecommerce ?
hi , i found an ecommerce system that i never see befor and i don't know it's open source or not can anyone help me with this ? if this is an open source system let me know what is it . here some screen shot of this system ( note that this site is not english )
-
adobe air
dose anyone has good book for adobe air please link to me .
-
mysql server 5.0
hi , i need mysql server 5.0 windows installer because my country(iran) in banned to access mysql web site i can't download it from mysql website if somebody do me a favor by upload entire pack somewhere so i can download it. i'll be much APPRECIATE that . tanks .
-
ajax features
hi , dose anyone know how to add some ajax features to the oscommrce ? any addons ?? see this web site for more information http://www.takshop.com/index.php sorry it's persian