Jump to content

[ Solved ] Features Field don't works in Catalog Price Rules Combiantions


Recommended Posts

Hi,

 

I've encountered a problem when create Rules using :

Catalog Price Rules Combinations

 

It works well with all combinations ( i've tested supplier, manufacturer and attributes ) but when i chose a combination with Feature the rule applied is every time the first field of the first feature.

 

For example :

Feature 1 - 0.5 inch, 1 inch, 2 inch

Feature 2 - black, red, white

Feature 3 - 10 inch, 20 inch, 30 inch

 

If i make a rule with :

 

1. All-Suppliers but only Products with Feature 3 / Option 2 ( 20 inch )

2. I Save It

3. When i edit the rules i've just made i find : All-Supplier but only Products with Feature 1 / Option 1 ( 0.5 inch )

 

This happen with any kinds of feature and any kinds of options.

 

Amar,

Edited by amar.prestashop (see edit history)
Link to comment
Share on other sites

Hi Benjamin,

 

I've make a fresh new installation on local ( localhost through XAMPP ) and the problem is still there.

 

I try to recreate the scenario :

- Catalog -> Features

New Feature : Display Dimensions ; Feature Values : 10.1" ; 15.4" ; 17"

- Price Rules -> Catalog Price Rules

I Create a Rule [ -20% ] : Category -> Laptop AND Feature -> Display Dimension -> 15.4"

 

cpr_ps_img_01.jpg

 

- When i come back and Edit the rule i've created the Feature field is wrong :

cpr_ps_img_02.jpg

 

- It is always the first Feature Value of the First Feature Field :

cpr_ps_img_03.jpg

 

I like to crate a bunch of groups of % discount prices based on categories, manufacturers and feature rules, so i like to use this great capability.

 

Thank you for your time.

 

Amar,

Link to comment
Share on other sites

  • 2 weeks later...

Hello.

 

I've fixed this - http://forge.prestashop.com/browse/PSCFV-9885?focusedCommentId=76121&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-76121

 

 

Hello !!!

 

I've digg this out, and I found out that there was no problem with saving the features selected to the DB, the problem is when you try to edit the rule, there is a minor bug in javascript at "/admin/themes/default/template/controllers/specific_price_rule/helpers/form/form.tpl":287

This line is "$('#id_feature[value={$condition.id_feature}]').attr('selected', true);" and it must be "$('#id_feature option[value={$condition.id_feature}]').attr('selected', true);"

 

If you notice the space+option between #id_feature and [value is missing on original code.

 

Fix this and you can now edit rules and see the correct features selected!

 

Best regards,

Henrique Torres

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...