Search the Community
Showing results for tags 'while'.
-
Hi, I have my code in php for some other project is like this <div class="post-wrap"> $i = 0; while ( have_posts() ) $i++; if($i==1) { $class= 'active'; } else { $class= ''; } <div class="box '.$class.'"></div> endwhile; </div> Now this gives the output like <div class="box active"></div> <div class="box"></div> <div class="box"></div> In this way I have made all the posts fadein and fadeout by jQuery. with the same reference I want to make fadein and fadeout some texts. For that I have developed module. In that I am getting all the values from database. So my code for module like this public function hookfooter($params) { $popup_styles = "SELECT * FROM "._DB_PREFIX_."database ORDER BY `id` DESC LIMIT 1"; $popup_styles_settings = Db::getInstance()->ExecuteS($popup_styles); $this->context->smarty->assign('PopupStyles',$popup_styles_settings); return $this->display(__FILE__, 'views/templates/front/footer-display.tpl'); } Here I have fetched the data and I have assigned the values to smarty. Inside smarty my code is like this {foreach from=$sliderValues item=row} <div class="box">name</div> <div class="box">name2</div> <div class="box">name3</div> {/foreach} but here I don't know how to use while and make loop counter so that I can add class active for jquery. So can somone kindly tell me how to make this work? Any help and suggestions will be really appreciable. Thanks
-
Hello everybody! I just downloaded Prestashop about a week ago. I do not know how to write or use HTML code, and have not changed any files for my website. My URL is Syrenosicards.com While attempting to add an image (1-1.2 MB) to a product lisitng, I keep receiving the error, "ERROR WHILE CREATING ADDITIONAL IMAGE" and a random picture of an iphone or computer shows up. I have no idea why this is happening. I am just trying to upload 1.2 MB pictures from iphoto. Can someone please tell me exactly how to fix this problem.