Mass assign default option within a BTO category. |
Post Reply |
Author | ||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
Posted: 20-January-2011 at 4:29pm |
|
I think I might be doing this wrong. I used BTO Products > Update Multiple BTO Products > Assign/Remove Products & Items and Update Category Settings.
I used the first one to assign a new BTO category to multiple BTO Products and then I used Update Category Settings to set the display type, to make the category required, to show product description, and to assign config settings for the category. However, I am unable to assign a default option to the category through these menus. This means no option is selected by default, which isn't a huge deal since the javascript catches a required category with no options, but it is a hindrance since it will slow customers down and it might cost a few sales. I will have to either manually edit each BTO Product to assign a default option for this category, or edit groups of BTO Products who's configuration settings I will then be able to assign to a few other products. Either way I'm going to have to do quite a bit of extra work. Is there an easy way to set a default option for a bto item category among multiple products? I'm sure there is and I will look into the code now, but it would be great if someone else already figured this out. |
||
ProductCart
Admin Group ProductCart Team Joined: 01-October-2003 Status: Offline Points: 135 |
Post Options
Thanks(0)
|
|
Hi Brett,
We understand the issue. The "Update Category Settings" doesn't allow you to set a default because it cannot make assumptions on which items have been assigned to the BTO product. The interface that allows you to add multiple items to N BTO products, however, could include that feature. So, this is a feature change that we can consider for a future version. In the meantime, the fastest way to address this is probably to edit the configSpec_products table in the store database. You will see the cdefault field: that's the one that defines whether that particular product is the default product. We hope this helps! |
||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
|
That saves me time looking for the table to edit. I think I'll just edit the asp file so I don't have to manually change the database each time I want to do this. Should be a fairly trivial script, and I will upload here when I'm done (probably a week since I'm not currently at the office)
|
||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
|
Ok, I think I got this working, at least for my purposes:
The only issue would arise when you're trying to add one or two options to a product and then you want to set one of them to default, when the product already has a default option that was already assigned to it. In this instance, it might try to add two separate options as default. Looking into this now. |
||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
|
I'm considering adding this query:
Before:
I think that would clear all defaults for that product, preventing multiple defaults. Edited by Brett - 23-January-2011 at 10:44am |
||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
|
Got it, the query that I needed to add was:
That clears all defaults for the category you're setting so you can set new defaults. There should probably be a way to NOT set a new default, but eh... In case anyone wants the complete updated asp file, here it is: AddRmvBTOItemsMulti4.zip This will add a new field to the page, allowing you to set a default when you add bto items to multiple bto products. It will, however, clear your previous defaults, so I'd advise that if you want to keep your current default, you re-add it to the bto products so you can select it as default when adding it. Edited by Brett - 23-January-2011 at 11:04am |
||
Brett
Groupie Joined: 22-April-2008 Location: Phoenix, AZ Status: Offline Points: 89 |
Post Options
Thanks(0)
|
|
Here's an updated version of the file which addresses the issue of having to re-set the defaults. The problem nearly solved itself. Since the radio buttons on AddRmvBTOItemsMulti4.asp are all deselected by default, I modified it so that if no radios are selected, then the previous default will not be changed. However, if one of the radios is selected, then the previous default will be cleared and the new default added. It only needed one if statement. Here is the updated file. No changes besides the ones listed in this thread have been made to the file. A diff compare on the file against the latest version of the file should show the exact changes made. AddRmvBTOItemsMulti4_2.zip
This updated file allows you to set the default option when assigning BTO item options to a BTO group across multiple products. |
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |