Sasni Posted July 6, 2016 Share Posted July 6, 2016 Hello. I use prestashop 1.6.1.6, and i sell software. I have added some combination of the products, For every combination I have added some specific prices. These prices must decrease depending on the amount. The rule applies only when the first value. Charge me a discount but only from 5 pieces in this case At 20 pieces not. Is Prestashop does not allow to set many specific prices for many combinations? Did I do something wrong, or maybe it is a bug? Link to comment Share on other sites More sharing options...
Sasni Posted July 10, 2016 Author Share Posted July 10, 2016 I noticed that if I copy and paste again the same code responsible for displaying a table of discount (product.tpl)... {if (isset($quantity_discounts) && count($quantity_discounts) > 0)} ... ... ... {convertPrice price=$qtyProductPrice - $discountPrice} </td> </tr> {/foreach} </tbody> </table> </div> </section> {/if} - This shows me the second level correctly. So, maybe something is wrong with this loop (foreach). And the second thing: If a specific price is set from 1 piece, this discount is shown. - Looka at screen: But if the specific price is set from 5 pieces, this discount is NOT shown. Link to comment Share on other sites More sharing options...
Sasni Posted July 10, 2016 Author Share Posted July 10, 2016 OK, i found problem. The second <tr> have style display:none; why? I don't now But... When I disable it in firebug, all works perfect. Now is the question : How to set this style to display:table-row? <tr id="quantityDiscount_{$quantity_discount.id_product_attribute}" class="quantityDiscount_{$quantity_discount.id_product_attribute}" data-real-discount-value="{convertPrice price = $realDiscountPrice}" data-discount-type="{$quantity_discount.reduction_type}" data-discount="{$quantity_discount.real_value|floatval}" data-discount-quantity="{$quantity_discount.quantity|intval}"> adding style="display: table-row !important;" don't work I think that parameter is changed somewhere in the js. Can you help me where? Link to comment Share on other sites More sharing options...
Sasni Posted July 10, 2016 Author Share Posted July 10, 2016 Alleluia! I found it! in theme (default-bootstrap\js\product.js) found $('tbody tr', quantityDiscountTable).hide(); and comment it // $('tbody tr', quantityDiscountTable).hide(); 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