omerdavid Posted July 2, 2015 Share Posted July 2, 2015 Hello My home page shows 5 items per row, in the category page it is possible to view max 4 items because of the col-md class that is devided only for 12, i would like to view in my category page 5 items as well but i couldnt find how to modify the category page to take the css from the same css that my home page is taking, any body knows ? Link to comment Share on other sites More sharing options...
NemoPS Posted July 4, 2015 Share Posted July 4, 2015 Check if you have this in your product-list.tpl {if $page_name !='index' && $page_name !='product'} {assign var='nbItemsPerLine' value=3} {assign var='nbItemsPerLineTablet' value=2} {assign var='nbItemsPerLineMobile' value=3} {else} {assign var='nbItemsPerLine' value=4} {assign var='nbItemsPerLineTablet' value=3} {assign var='nbItemsPerLineMobile' value=2} {/if} This, or something alike. It really depends on the template Link to comment Share on other sites More sharing options...
omerdavid Posted July 5, 2015 Author Share Posted July 5, 2015 yes i do have this in my Product-list.tpl ,the solution for me was: 1.Changing : {assign var='nbItemsPerLine' value=5} 2.Changing : col-md-{15/$nbItemsPerLine} instead of {12/$nbItemsPerLineTablet} <li class="ajax_block_product col-xs-12 col-sm-{12/$nbItemsPerLineTablet} col-md-{15/$nbItemsPerLine}{if $smarty.foreach.products.iteration%$nbItemsPerLine == 0} last-in-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLine == 1} first-in-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModulo)} last-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 0} last-item-of-tablet-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineTablet == 1} first-item-of-tablet-line{/if}{if $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 0} last-item-of-mobile-line{elseif $smarty.foreach.products.iteration%$nbItemsPerLineMobile == 1} first-item-of-mobile-line{/if}{if $smarty.foreach.products.iteration > ($smarty.foreach.products.total - $totModuloMobile)} last-mobile-line{/if}"> 3. In the global.css : changing the width to 20%. .col-md-3 { width: 20%; } Link to comment Share on other sites More sharing options...
omerdavid Posted July 5, 2015 Author Share Posted July 5, 2015 I was asked to change the visible product prise according to the shipping costs, in other words : if (the shipping cost< certain value) { product price=product price+shipping costs; and it should says that shipping is free; } else { continue;} Is there a file which iterates through the products array ? or any other way ..... Link to comment Share on other sites More sharing options...
NemoPS Posted July 6, 2015 Share Posted July 6, 2015 Shipping cost of the product? Where? From the products list or single product page? Link to comment Share on other sites More sharing options...
omerdavid Posted July 6, 2015 Author Share Posted July 6, 2015 Product price is visible in the single product page,as well as the product-list in the category page and home page, Shipping price is visible in the cart which is Ajax call (and ofcourse if the user decides to check out and pay he is being transfered to his cart which is a page not an Ajax call), the price should change all over. Link to comment Share on other sites More sharing options...
omerdavid Posted July 7, 2015 Author Share Posted July 7, 2015 Someone have an idea ? Link to comment Share on other sites More sharing options...
NemoPS Posted July 8, 2015 Share Posted July 8, 2015 So you don't mean the products' extra shipping cost. You can try 2 things: 1- in the product controller, assign Cart::getOrderTotal(true, Cart::ONLY_SHIPPING, which holds the shipping value, to a variable you can then use in the template 2- use that method directly in the template for your condition Link to comment Share on other sites More sharing options...
omerdavid Posted July 8, 2015 Author Share Posted July 8, 2015 Where should i do it in the : function initContent() ? should i make the call for this function Cart::getOrderTotal(true, Cart::ONLY_SHIPPING) and assign it to a variable and then add the shipping cost to the product_price? cause the controler does'nt use this function ... and in which and where in the .tpl i should make the change as well ? i am not yet famlier with Prestashop work flow and structure ,even i have read there documantation. is there a good guide for developers who are not familier with prestashop to understand the work flow ? Link to comment Share on other sites More sharing options...
NemoPS Posted July 10, 2015 Share Posted July 10, 2015 Since it spans across multiple pages, I'd use a module that hooks into the header, assign the variable, then use it in the template. (header, not top)As for docs, the only (not so useful) available ones are at doc.prestashop.com Link to comment Share on other sites More sharing options...
omerdavid Posted July 13, 2015 Author Share Posted July 13, 2015 ok i need to lear n how to hook a module first.... Link to comment Share on other sites More sharing options...
NemoPS Posted July 15, 2015 Share Posted July 15, 2015 check out the official docs: http://doc.prestashop.com/display/PS15/Creating+a+PrestaShop+module Link to comment Share on other sites More sharing options...
omerdavid Posted July 15, 2015 Author Share Posted July 15, 2015 thanxs i will work on it later on, i am jumping from one problem to another ,i am trying to re-design the site, with no luck already 3-4 days,for example if 2 moduls are attached to one hook how they are being ordered ,and where can i change there order,cause in the header.tpl i see only the call for the hook ?also how do i call to hooks that i dont see in the header.tpl for example i tried to attach the topmenu to displayNav in order to place the topmenu a little down from its current location . Link to comment Share on other sites More sharing options...
NemoPS Posted July 17, 2015 Share Posted July 17, 2015 modules -> Positions. http://blog.arvixe.com/prestashop-101-day-6-1-6-prestashop-modules/ Link to comment Share on other sites More sharing options...
omerdavid Posted July 17, 2015 Author Share Posted July 17, 2015 thanx ,i saw that video its very good as long as i am trying to move moduls from right to left columns or to hooks that there space is not so wide but in my case when i am trying to position moduls and logo within one hook while changing there order in the BO did'nt help, maybe because i am trying to position them horizontaly, it gives me a lot of problems ,i just couldnt make it, i am stuck. also suddently i am not getting any var in the product-list.tpl that was assigned to smarty in the CategoryControl.php , i tried to do assign in the CategoryControlCore it self as well as in the override folder but when looking at the smarty debug consule i dont see the assigned var. i replaced the smary folder from an older backup i had steel nothing is changing also i cleared smarty,prestashop,browser cach .... i will glad to get help since there are so many problems with the system and it is taking days to solve such small issues... Link to comment Share on other sites More sharing options...
NemoPS Posted July 18, 2015 Share Posted July 18, 2015 In that case you might want to adjust css and html as well, as they might not fit due to their markup Link to comment Share on other sites More sharing options...
omerdavid Posted July 23, 2015 Author Share Posted July 23, 2015 as they might not fit due to their markup markup means? the modules order per hook in the BO? is it possible to change a button to check-box in each product? means that in the product-list i have "add to cart button" and i need it to be check-box or some other controler, when it is checked/pressed the it will do the add to cart action ? Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2015 Share Posted July 24, 2015 Markup -> the html structureAs for the other question, yes, but you need to know html, smarty (a bit) and javascript Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now