jsqu99 / spree_flexi_variants

Spree extension to create product variants as-needed
BSD 3-Clause "New" or "Revised" License
116 stars 143 forks source link

Spree 1 3 stable #61

Closed jetsgit closed 11 years ago

jetsgit commented 11 years ago

Jeff, this is your 1-2-stable, but with _base_helper_decorator.rb removed. Haven't tested extensively, but it corrected the only problem I have had with Spree 1-3-2-beta.

So perhaps it would be a starting point for your 1-3-stable, because it is same as 1-2-stable, minus _base_helper_decorator.rb

It corrects issue I had of not being to edit option_types in the new admin.

jsqu99 commented 11 years ago

Thanks for contributing. I'll have a look as soon as I can.

jetsgit commented 11 years ago

Jeff,

Your master branch is working with Spree 1-3-stable in development.

For some reason in production, when I select ad-hoc option types, then click on the 'edit' icon for an option type, e.g. 'size', I am not able to get the mouse to 'focus' on the field for Price adjustment, therefore I can not edit the field.

So it is almost there. If you have any ideas would really like to hear them!

Thanks,

Jet
jetsgit commented 11 years ago

Well, just tried development again, and now it doesn't work!

Jet

jsqu99 commented 11 years ago

I'm really hoping to have a look at this early next week. Again, thank you very much and I'm sorry for the delay

joshchernoff commented 11 years ago

There is an issue with this branch and the main branch where a js error gets thrown from the edit.js file ("not sure where that file is located") on line 16

$("#add_product_name").product_autocomplete();
Error "Uncaught TypeError: Object [object Object] has no method 'product_autocomplete' "

This error gets thrown on all admin pages which breaks the taxonomy tree.

I have not fully looked into the issue just yet, but I thought I would share my initial findings first.

jsqu99 commented 11 years ago

the spree guys have renamed some of the admin product javascript methods a few times and my version is out of synch with theirs. i usually just copy the techniques i see in spree and reuse them, so i'd look at how they are doing the product autocomplete in 1.3 and rework the flexi variants code.

the spree admin code is probably in assets/javascripts/admin

jetsgit commented 11 years ago

I made the following change in app/assets/javascripts/admin/orders/edit.js

   /* $("#add_product_name").product_autocomplete() */;
   $(".variant_autocomplete").variantAutocomplete();

This pulls in changes from Spree 1-3-stable.

I also changed:

app/views/spree/admin/ad_hoc_option_types/_option_value_fields.html.erb

   <td class="actions"><%= link_to_remove_fields t("remove"), f  %></td>

to

  <td class="actions"><%= link_to_remove_fields t("remove"), f, {:no_text => true, :class => 'remove_fields'}  %></td>

This syncs with new def for link_to_remove_fields wanting a third argument.

However, now getting the error:

 Showing /home/jet/RailsApps/spree/spree_flexi_variants/app/views/spree/admin/ad_hoc_option_type /_option_value_fields.html.erb where line #6 raised: 

 NoMethodError in Spree/admin/ad_hoc_option_types#edit 

 undefined method `admin_ad_hoc_option_value_path' for #<#<Class:0x00000007a24bd8>:0x00000007a6edf0>

Jet

jetsgit commented 11 years ago

Jeff, have you had a chance to look at this yet? I am still not getting anywhere. If I delete

 link_to_remove_fields t("remove"), f, {:no_text => true, :class => 'remove_fields'}

I am able to edit ad hoc variants. But Spree Product Option Types is still not editable. If you have any thoughts or solutions for this it would be great to hear them.

Thanks!

Jet

jsqu99 commented 11 years ago

I've very sorry. i'm swamped right now. probably won't have the chance for several more days

On Wed, Feb 13, 2013 at 1:56 AM, Jerrold Thompson notifications@github.comwrote:

Jeff, have you had a chance to look at this yet? I am still not getting anywhere. If I delete

link_to_remove_fields t("remove"), f, {:no_text => true, :class => 'remove_fields'}

I am able to edit ad hoc variants. But Spree Product Option Types is still not editable. If you have any thoughts or solutions for this it would be great to hear them.

Thanks!

Jet

— Reply to this email directly or view it on GitHubhttps://github.com/jsqu99/spree_flexi_variants/pull/61#issuecomment-13476811.

mscottford commented 11 years ago

This looks similar to a fix I just made to the 1-2-stable branch in #62. I'll look into porting this to 1-3-stable as well.

jetsgit commented 11 years ago

That would be great Scott. In mid-sentence Jeff made a commit, but my commit did not fix everything.

binaryphile commented 11 years ago

I've upgraded to master latest to resolve the option editing issue on my 1.3.2 store, and it went from erroring when I tried to go to the edit options page to erroring when I try to choose an option type to add.

My new error message is undefined method 'admin_ad_hoc_option_value_path'.

Just reporting this to see if anyone else is having a similar issue.

jetsgit commented 11 years ago

Oh, yes, that is error I am currently getting.

jetsgit commented 11 years ago

Ted, tried your master branch but I could not get it to work with a vanilla Spree 1-3-stable install and gemset. I know it's working for you so not sure what the problem is.

I tested my spree-1-3-stable branch against a vanilla install and it worked. I believe one of the major differences is that I deleted base_helper_decorator.rb

Other changes are obvious from the gist.

Here is diff between the 2 versions, not sure what proper way of doing that here, so just giving the gist link.

 https://gist.github.com/bluehandtalking/5066332

Perhaps you could take a look at the gist, Jeff, see what you think.