spree_flexi_variants
spree_flexi_variants copied to clipboard
amount_times_constant calculations
Instead of using the entire field as the obj to calculate an amount, it adds each letter and acts like the 'engraving' calculator.
Hello @Ruekompa,
Please provide the information requested in the Contributing Guide for Spree, under the heading "Filing an Issue".
Thank you.
I solved this particular issue by removing .val() from the file _amount_times_constant.html.erb from: return <%= calculator.preferred_multiplier %> * $(obj).val().length; to: return <%= calculator.preferred_multiplier %> * $(obj).length;
@Ruekompa I'd like to request the information from the Contributing Guide again. Please provide this information so that we know exactly what is going wrong so that we can accurately fix this problem.
Thank you.
Alright @radar, I will do so when I get a little extra time. I was on the road a week for work and back now. So I'll try and get this done by the end of the night. Thanks for all the work you and the others have done.
Alrighty, excellent. Thanks for letting us know @Ruekompa :)
Spree Stable-1-3 Rails 3.2.13
Extensions: spree_gateway spree_auth_devise spree_static_content spree_fancy spree_flexi_variants
Using the extension "Flexi Variants" creates a page in the /admin console called "Customization Types".
Clicking on "New Product Customization Type" button takes you to the form fields: Name, Presentation, Description and Calculator.
The "Amount Times Constant Calculator" is where you set your value. In application it behaves like the "Engraving Calculator", which sums each letter. While instead it should give a value to the entire field.
You apply the "Customization Types" with a new or Existing Product. Within your 'edit product' section On the right hand column there is a section that is again titled, "Customization Types." This section will allow you to add your previously created customization types by clicking "Add Product Customization Type."
the view is at "/product/name_of_product"
When filling in the fields each letter is summed in the total, which is calculated above.
in the file
"_amount_times_constant.html.erb"
When removing .val() and changing the line from:
'''return <%= calculator.preferred_multiplier %> * $(obj).val().length;'''
to:
'''return <%= calculator.preferred_multiplier %> * $(obj).length;'''
This above line change calculates the entire field; however, I don't know if that is a legitimate fix.
Another issue which I will file separate is that the fields do not maintain the amount you assign in the 'Customization Types" options. After you restart the rails app the first option inherits the 2nd options amount.
I'm hoping to take a look at this soon