Needs review
Project:
Node import
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2010 at 13:32 UTC
Updated:
1 Dec 2011 at 04:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
teoverton commentedHi z1rra,
Did you have any luck with this? I find myself in he same situation where the price per role is not being exposed as a field which I can then map to in node import for mass importation of the products.
Any help would be appreciated.
Thomas
Comment #2
Anonymous (not verified) commentedHello
I have the same issue as yours.
Comment #3
teoverton commentedUnless I am missing something, the import of the price per role looks as if it should work quite easily(at least with just a single other role) if the field is imported as an array of the relevant role ID and the corresponding price.
Is their anyone that knows how to import a field as an array within the following array? If I add this to the uc_product.inc:
$fields['role_prices'] = array(
'title' => t('Dealer price'),
'group' => t('Product information'),
'weight' => 15,
I get the price field to associate for the import, but of course nothing shows up in the uc_price_per_role table because it appears the field needs to be an array ("RID", ""price"). I'm missing how to add in the role ID into the array (or make the field input an array). In my case the role id for the "dealer" is 8, so I believe the 'role_prices ' field should be an array of ['8'=>'relevant price] but how do I format that as a filed in the uc_product.inc.
Can someone give me a pointer on this. I'd really appreciate it. I see people have been looking how to do this for over a while but I don't see any success yet. This is fairly important functionality for real-world ubercart!
Comment #4
drummondf commentedI too am looking for some help with this issue - teoverton, wonderful solution so far - wondering if anyone can finish this up?
Comment #5
nvl.sateesh commentedHi Friends,
I had the same situation where I had to import Price Per Role via Node Import. The CSV file had the price per role in separate columns. Here is how I achieved it. It works for me, you can see the attached .inc file if it works for you too.
Comment #6
criznach commentedI also put some research into this, and created a rough version of a helper module that adds a mapping field for each enabled role on the price per role settings page, which can be mapped to any column. If anyone is interested in sponsoring my work, I'll do the work to polish and share it, and/or submit it to the node_import maintainer.
Comment #7
drummondf commentedSateesh, this is fantastic! Thank you so much! I have a question however:
I have two Price-per-Role prices for my products in addition to the retail price and sell price (not using cost). How do I get this add-on to let me assign the two prices to the proper Price-per-Role fields?
Would it be possible to use this same method for flat rate shipping options? I know that would fall outside of this issue queue but its something I'm looking to resolve.
Do you also have a page where I can make a donation to you? I'll owe you one if I can get this working!
Sincerely,
Eric G.
Comment #8
nvl.sateesh commentedHi Eric,
I am glad it helped.
I did not understand what you meant by "How do I get this add-on to let me assign the two prices to the proper Price-per-Role fields?".
Yes you can use this same method for flat rate shipping options as well. Once you are in the post-process part, you can do all that you need. If you can elaborate more, maybe I can help more.
For some reason, I am not getting any email updates when a reply is posted to my queue. So late reply :-) No donations page as such bro; I will send my PayPal if you get it working and want to donate :-) Cheers!
Comment #9
criznach commentedHere is my price per role import module. I hope you find it useful.
Chris
Comment #10
SeanA commentedThanks criznach and nvl.sateesh for your work on this, it's really nice to have this working.
Here's a patch based on the code in #9. If anyone tries this, please post a review and let us know how it went.