1. athenacraftsltdltd
  2. RO CSVI
  3. Wednesday, 25 April 2018
  4.  Subscribe via email
Hello.

Is it possible to delete a price without providing the shopper group, or - crucially - the old price?

I want to automate a process of updating prices, but the only input provided will be a file containing the skus and new prices. We only have a small number of shopper groups so I can add those to the field default if there's no other way, but I can't know what the original price was.
Accepted Answer Pending Moderation
Hello,

A shoppergroup must be provided because if one is not provided CSVI checks if it is empty. The other fields can be required, that depends what is stored in the database. If none is provided CSVI checks if it is NULL or 0000-00-00 00:00:00 depending if it is a date field or not.

The old price is not needed for the product as long as you included the price_delete field and use the VirtueMart Price import routine.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
Accepted Answer Pending Moderation
I thought that's what I did... so the file only needs to look like this?

product_sku shopper_group_name price_delete
MYLAR125 Retailer Group Y
MYL-125-A4-001 Retailer Group Y
MYL-125-A3-001 Retailer Group Y
MYL-125-A2-001 Retailer Group Y
MYL-125-A4-100 Retailer Group Y

because if so I tried that and it didn't work. I'll run some more tests tomorrow if I've presumed the file structure correctly...
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,

The structure looks good but as always, we are going to need that all important debug log to see what happens.
Kind regards,

RolandD

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 3
Accepted Answer Pending Moderation
Of course. Let me test it a bit more tomorrow to make sure I wasn't making a stupid error. Thanks
  1. more than a month ago
  2. RO CSVI
  3. # 4
Accepted Answer Pending Moderation
Hi Roland,
I've had a little more time to look at it this morning. Using the file structure above, the log details are telling me that each row is skipped because required fields are missing, but it doesn't seen to specify which.

I'll email you the debug log shortly.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
The required fields for price import are product_sku and product_price, since product_price is missing in your import you are seeing the missing fields message. You need to add product_price field to your import file.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 6
Accepted Answer Pending Moderation
Hi Tharuna,
Thanks for your response, but this is my point: I don't know what the original product_price is to be able to add it to the delete import.
  1. more than a month ago
  2. RO CSVI
  3. # 7
Accepted Answer Pending Moderation
Hello Ian,
You can simply add a product_price column to your import file with value 0. This way you are passing the missing field error message and since the price is going to be deleted adding 0 to product_price won't change anything. Let me know if it works.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 8
Accepted Answer Pending Moderation
Hi Tharuna,
That doesn't seem to work. I'm getting exactly the same error about missing fields. I'll send over another log.

For clarification, I'm passing in a file containing the sku and prices, but I'm skipping the price fields and the product_price, shopper_group_name and price_delete are all default values. I'll try to illustrate:
Original file:

SKU price1 price2 price3 price4
0001 1.00 2.00 3.00 4.00
0002 1.00 2.00 3.00 4.00
etc

Template:

SKU skip skip skip skip product_price shoppergroup_name price_delete
[read from file] - - - - [default to 0] [default to group name] [default to 'Y']

CSVi Preview:

SKU Product_price shoppergroup_name price_delete
0001 0 Retailer Group Y
0002 0 Retailer Group Y

Will this have any impact on processing?
  1. more than a month ago
  2. RO CSVI
  3. # 9
Accepted Answer Pending Moderation
Hello,
Do a small change to your default value for product_price. Instead of 0 set it to 1 and try the import again. This should work.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 10
Accepted Answer Pending Moderation
Awesome. That looks like it did the trick. Thanks again!
  1. more than a month ago
  2. RO CSVI
  3. # 11
Accepted Answer Pending Moderation
One more quick query: can I delete prices against multiple shopper groups? I vaguely recall I could use a pipe separator but it doesn't seem to be working.

product_sku shopper_group_name price_delete
MYLAR125 Retailer Group|Wholesaler Group Y
MYL-125-A4-001 Retailer Group|Wholesaler Group Y
MYL-125-A3-001 Retailer Group|Wholesaler Group Y
MYL-125-A2-001 Retailer Group|Wholesaler Group Y
MYL-125-A4-100 Retailer Group|Wholesaler Group Y
  1. more than a month ago
  2. RO CSVI
  3. # 12
Accepted Answer Pending Moderation
Hello,
No, pipe symbol won't work, you can add multiple shopper groups on multiple rows


product_sku shopper_group_name price_delete
MYLAR125 Retailer Group Y
MYLAR125 Wholesaler Group Y
MYL-125-A4-001 Retailer Group Y
MYL-125-A4-001 Wholesaler Group Y
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 13
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!