Closed (won't fix)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Nov 2008 at 20:36 UTC
Updated:
28 Feb 2013 at 09:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
rszrama commentedCompare these two product pages:
UC 1: http://livetest.ubercart.org/uc1/product/ubercart-beanie
UC 2: http://livetest.ubercart.org/uc2/product/ubercart-beanie
Comment #2
Island Usurper commentedAdded product information as extra "fields" to CCK. Since uc_product was adjusting the weight of the body field, that also was altered from where CCK had put it. The Manage Fields tab for the Product content type(s) really only affects the Product information fieldset on the node form. The Product fields settings page is still the place to adjust the order of those fields on the View tab.
Comment #4
jm.federico commentedHi, old post, but decided it is better to re-open something instead of creating new-duplicated issues.
Here is a patch to be able to set the order in which the fields are rendered using CCK "manage field" interface.
It exposes all the fields available at the "
productmanage fields" setting page for each node type that is a product.It would be great if this happens in future versions of Ubercart
Cheers
Comment #5
webservant316 commentedI installed this patch, but the product node CCK field display order seems uneffected. Though I rearrange them the view display does not change. Further your note above suggests that the fields would be exposed in the store>configure>product area, but they are not exposed there but at the 'manage fields' area.
Do I understand your patch properly?
Comment #6
jm.federico commented@webmaster_prwa
I didn't express my self correctly, here I go:
What the patch does is it exposes each field from ubercart into the "manage fields" interface for each node type that is a product.
If you have admin menu:
Content Management > Content Types > Edit -node type- > Manage Fields
This way you do not have to to go to the store admin interface to rearrange them, which makes sense, because now you do not have to guess the weight of the fields, and it all happens in one place. And not only that, you can set them for each product type that you have.
Hope that clarify things.
Federico
Comment #7
webservant316 commentedThanks, I'll try the patch again. However, I think the first time I tried it
I found the fields exposed in 'Manage Fields' as you say more cleary.
However, when I rearranged the fields there, the display order on the
node page was uneffected.
Jeff
Comment #8
webservant316 commentedJust installed this patch a second time and I see the ubercart product fileds over in Content Management > Content Types > Edit -node type- > Manage Fields. However, when I move the fields around the product node display field order is uneffected.
Comment #9
jm.federico commentedhum, that is strange, which fields are you changing?
Keep in mind that with Ubercart the body fields is not used anymore, and the Description field takes its place.
What version of CCK, Ubercart, and Drupal are you using?
Do you have any debugging tool? If not, I would recommend firebug (http://getfirebug.com/) + drupal for firebug (http://drupal.org/project/drupalforfirebug) (https://addons.mozilla.org/en-US/firefox/addon/8370/)
With this you can check the fields weight after they are rendered in your node page (http://yourdomain.com/node/###)
If you get those tools, check the weight for each field under #content_extra_fields
then go and shuffle them around and recheck the weights.
If they change then there must be something messing your display, if they do not change, I would be completely clueless.
Let me know what you find.
Federico
Comment #10
webservant316 commentedWorking now.
Moved to Zen theme for unrelated reasons.
Your product field ordering works with Zen but not with Zeropoint.
No doubt Zeropoint is making a mistake.
Thanks for this module.
Very helpful to me!
Comment #11
jm.federico commentedAttaching patch against 6.x-2.4
Comment #12
KennyVanLent commentedHave added this code, works perfect first time. Perfect code.
But is their a possibility to add a Configure and Delete? Meaning, full control through CCK?
Please let me know :)
Thank you :)
Comment #13
jm.federico commented@Kenny van Lent
I don't really get what you mean with configure and delete.
I'm guessing you refer to the options you get with fields created using CCK, where you can remove them, or add them from the same interface?
If that is the case, it is not possible, these fields are created by Ubercart, and Ubercart is responsable for showing them or not, all this does is lets us change the weight in a more coherent way, rather thann having to go to Ubercart's interface and guess what weights are the ones we need.
Basically what happens here is that Ubercart will set the weights according to its settings, then CCK will override them. That's all the patch does.
Cheers
Federico
Comment #14
SeanA commentedThanks for this useful code. +1 for this getting added to Ubercart.
Comment #15
Volx commentedGood patch! The way it works right now is really confusing for someone who is used to cck to order the fields. Since the actual weights are never exposed to the user, having to guess the values for the product fields is really annoying and error prone. Moreover it is not reliable, since rearranging the cck field order changes the weights intransparently.
The patch above works like a charm. I took it and went a little bit further by removing the list position field from the admin/store/settings/products/edit/fields form. Since the list position within that form has no function anymore, it only confuses the user. This of course happens only when cck's content module is enabled.
Comment #16
smscotten commentedThis is more than useful: it's really important integration, especially because the weights of CCK fields can be anywhere from -50 to 50 (and aren't set numerically by the user) whereas the weights of Ubercart product fields can only be set between -10 and 10. Without this patch (or forcing the matter by hard-coding the fields into a theme file) there is no way to put fields in any order.
Thank you JM and Volx!
Comment #17
Island Usurper commentedIs there a way to keep the existing order of the fields from changing when this patch is applied? While it's now easy to fix the problem, I'd rather not make everybody go back in to their field settings and put everything back the way they want them just because they updated Ubercart.
It might be unavoidable, but I'm hoping someone comes up with an idea first.
Comment #18
SeanA commentedHere's #15 reworked so the existing field order is retained.
Comment #20
SeanA commentedArgh. =/ Same patch, renamed.
Comment #21
kuydigital commentedWhere should I apply this patch?
Comment #22
tr commentedLet's see what the testbot has to say. Bot will ignore patch in #20 because it has that _D6 at the end of the name, but @SeanA says #18 is the same ...
Comment #23
tr commentedComment #24
tr commented#18: ubercart-333085-18.patch queued for re-testing.
Comment #25
webservant316 commentedGlad to see this patch making it into Ubercart. Thanks!
Comment #26
webservant316 commentedI see this patch is still not applied to Ubercart 2.7. I am upgrading to 2.7 and so am rolling the patch forward manually in my own install... again.
Note that I am still using the patch in #4, though the line numbering / placement in the module had migrated since the original patch. The patch in #4 works and meets my needs, even though the notes above say that it failed unit testing. There seem to be better patches following, but they also appear to be more complicated and also fail unit testing. I am reluctant to test any of the later patched because #4 does work for me and I am just too busy these days.
Hoping to get more community action on this issue and help from Ubercart experts. It still seems surprising that this patch hasn't made it into the module. Doesn't anyone reorder their Ubercart product fields with CCK fields present? This seems to be an essential feature to me. I am tempted to change the priority to 'major' in hopes of getting more serious help with this issue.
Ubercart is a great module and our business depends upon it. Thank you for your efforts to improve it.
Comment #27
SeanA commentedIf you'd like to see this get into Ubercart, please apply the latest patch and test it (and post a patch for 2.7 if you can). It's an improvement over the original and doesn't add anything really complicated or that can be considered harmful, mostly it's just setting default values and it also checks to see if CCK module is present before applying the weights.
Comment #28
webservant316 commentedok - here is the latest patch recast for Ubercart 2.7.
I have applied the patch to the code and plan to test this week. I will report back.
The patch format is from TortoiseSVN. Sorry if that doesn't pass muster, someone else will need to help. I've also attached the changed 2.7 files (with a '.txt' extension so I could attached them) with the patch applied if that helps anyone to make a better patch file.
Comment #30
webservant316 commentedMy apologies for tarnishing this effort. No doubt the TortoiseSVN patch format failed the test. I am pretty sure the changes are properly applied to the two files above. If someone with better tools could make the patch file it would be greatly appreciated. I would love for this to get into the next version of Ubercart.
Comment #31
webservant316 commentedno dice on the later patch for me. I am sticking with the original one for now. The later patch does not seem to respect the CCK field ordering when editing the product node. Whoever ever wrote or understands the improved patch is going to have to invest some effort and re-post.
Comment #32
webservant316 commentedfurther testing today.
the simple patch at the top of this issue continues to work for re-ordering fields on a product node both in view and edit mode. not sure what the issue is with the improved patches. I thought perhaps my upgrade to Ubercart 2.7 was causing both patches to not properly order the fields when in edit mode, but no. the initial patch works for view and edit, but the last patch only works for view and not for edit. also note that the 'product information' block of fields stubbornly stays at the top of the edit page and other fields stay put and I cannot move them. perhaps @SeanA can help us out.
Comment #33
SeanA commentedYou're right, there was a problem. This one should work. The default weights are set the same as Ubercart, and can be overridden on Content type -> Manage fields.
Comment #34
webservant316 commentedperformance of the #33 patch still not quite right. still works completely when viewing node. field order is also responds to changes and properly reflected when editing a node, EXCEPT for the 'product information' block of fields still insists on being top most on the form. It is a little weird not to be able to list the node title on the top, plus it seems like the patch should at least leave the field placements where they were. Can't really move to this patch as the field order when editing a node would be disconcerting to my users.
Comment #35
webservant316 commentedFYI - I am still depending on this patch and just manually installed it in Ubercart 2.9 for my install.
Also the later patches still do not work for me, so still using #4.
Comment #36
sdowney2002 commented#18: ubercart-333085-18.patch queued for re-testing.
Comment #37
longwaveThis has been hanging around a very long time, but changing this now on all 20,000+ existing 6.x installs is just likely to confuse people more than anything. New sites should be on 7.x where this has long since been changed. As per #1903564: [policy] Maintenance phase for 6.x-2.x branch we are not accepting new features on 6.x any longer.