Me again. About the different commissions to different roles for different products (admin/store/settings/seller/commission). I have a few node types are defined as goods, and there are several roles, with different commissions. I can define the commission for only one node type, the commission for the rest reset after save. Perhaps this has already been discussed, but I have not found.

CommentFileSizeAuthor
roles_and_comissions.png4.39 KBkeereel

Comments

syndicateStorm’s picture

Hey keereel, check out http://drupal.org/node/440932. I actually had to make a minor change to the database table (see the mp_products.install file). Are you using the latest dev release? I'm not sure this is the issue but you may need to uninstall and reinstall the Marketplace Products module. Before doing this I would comment out the "variable_del" functions in the mp_products.install file. That way after you uninstall and reinstall, all you will need to do is redefine all your roles and commissions...

Alternatively, if you are a SQL guru, you could just change the primary key of the mp_seller_rates table to ('rid', 'class').

Let me know what you find out.

keereel’s picture

Status: Active » Closed (fixed)

Looks so that helped. I would not want to lose the data on existing products. But it feels good, thank you very much. I reinstalled the module, removing the line with 'variable_del'. Before that was last year's version.

keereel’s picture

Category: bug » support

It seems that the re-installation of the module (with a 'comment out the "variable_del" functions in the mp_products.install file') delete the data about the orders that were made at that time. Information about ordering is in Ubercart, but not in the user profile whose goods purchased. Is there any chance to fix it and return the information on the place?

keereel’s picture

Status: Closed (fixed) » Active
syndicateStorm’s picture

Did you only uninstall and reinstall the "Marketplace Products" module as described in #1? If you look at mp_products.install all that should be deleted is the mp_seller_rates table. So the only data you should lose are the different commission rates. Once you redefine these, you should be good to go? Let me know some more details and I'll see what I can do.

keereel’s picture

Hm.. I'm not sure. Maybe I reinstall not only products, but all the components. Will there be enough to import the old table mp_seller_order_statuses?

syndicateStorm’s picture

Hey Keereel,

For efficiency the databases usually don't have redundant data. Are you getting bugs or is the data just missing? I think the best approach would be to restore the database from a backup if you have one? Sorry for any inconvenience. Given the risk, I should have been clearer. I should also write an upgrade for the install file so users can just upgrade instead of having to uninstall and then reinstall. I will certainly help in anyway I can, just let me know.

keereel’s picture

No error messages is displayed - just no data. I can not revert to the whole old base completely - since that time there were new data (nodes). Table mp_seller_order_statuses (as I understand it, it kept the lost data?) is empty (no more orders from that time). I have a SQL-backups with this order. What tables do I need to import that would return the data?

PS Thank you for your job.

syndicateStorm’s picture

I'm not sure I understand?

I would check all tables beginning with mp_ to see if they are empty. The most critical tables are probably mp_seller_order_statuses and mp_seller_payments. I didn't understand if you have these tables backed up? Are the new nodes showing up in mp_seller_order_statuses correctly?

I think what you are saying is, you do have a backup of mp_seller_order_statuses, but you don't want to overwrite the "new data" in mp_seller_order_statuses. Is this correct? If this is true we just need to get the SQL syntax correct and it shouldn't be a problem. Let me know.

syndicateStorm’s picture

Were you ever able to resolve this?

keereel’s picture

Sorry, I did not see your message.

I'll try to describe in chronological order. D6, UC2, MP (early version)
1. It was an order on the site. It was seen in UC reports, and the sellers profiles. All right.
2. Made a full backup of SQL-database.
3. Upgrading MP, I deleted all the data module MP (#6). Now, order data are visible only in UC reports, not in the sellers profiles.
4. The site was to do some work: added and edited some of the nodes.
5. (not yet made a step, I need instructions) What are the tables from backup (from step 2) I need to import into the current SQL-database that would return the data make an order in sellers profiles, but does not affect the data on the modified nodes?

syndicateStorm’s picture

Sorry I haven't gotten back to you. You will probably want the mp_seller_payments and mp_seller_order_statuses tables. These contain no node data just infomation on the status of orders and payments. As long as you merge this with the existing data you should be ok. Each table row is uniquely defined by order and payment IDs so there shouldn't be any conflict with new data as far as I can tell.

syndicateStorm’s picture

Status: Active » Fixed

Fixed?

keereel’s picture

I'll try it right now.

keereel’s picture

It's look like helps. mp_seller_payments is empty, only mp_seller_order_statuses contains data. I insert old data to a new table (add it). Just add ",0" at the end of each row, because old table contains 4 columns, but new - 5.

Thank you.

Status: Fixed » Closed (fixed)
Issue tags: -Ubercart, -roles, -marketplace, -comissions

Automatically closed -- issue fixed for 2 weeks with no activity.