CSV importing with mixed users, pricing and products

  • Posts: 3
  • Thank you received: 0
5 months 3 weeks ago #334677

-- url of the page with the problem -- : www.clydesdale.net
-- HikaShop version -- : 4.4.3
-- Joomla version -- : 3.9

Forum Newb although been using HIKASHOP on our company website for several years.
I have tried searching but haven't been able to find the correct answers to what i need (or where i might find the documents detailing exactly what i need to do).

We are currently set up as follows to give near-live pricing and stock on our website:

  • Small, local MS-ACCESS database on our local server for our MD to manage with list of the company products that are available through our webstore.
  • SAP Business objects / Crystal reports creates a hika-formatted CSV that pulls in pricing and stock from our business management system.
  • SAP then places CSV file on hosted webserver via FTP every 30 mins (we don't sell much through our website so this is live enough for us)
  • Chron / mass action runs to extract CSV contents on to relevant hika products. We had someone set-up this mass action for us originally but i *think* I see how it is set-up
This has all run nice and stably for a few years but we only have 1 level of pricing and availability to all users: a product is either "Web sold" or "Not web sold"
We use quite a lot of variants in several combinations as shown HERE

However we are now in the position where I need to be able to offer our key customer (Call them XX) a dedicated purchasing platform and pricing and I am having trouble formatting the CSV correctly to achieve the following scenarios.

Scenario 1:
Product is not for web sale. Our hikashop is currently set to display "Phone the office" if no pricing is provided via CSV

Scenario 2:
Product is for "general" web sale but is not available to customer XX. "General" price and stock level needed for all variants and non-variant based products. Customer XX should not see these items.

Scenario 3:
Product is only for sale to customer XX with pricing and stock specifc to them. General users should not see these items

Scenario 4:
Product is for sale both to general customers and to customer XX but each gets specific pricing. Stock levels are the same.

I have set up a trial XX user and XX user group in Joomla.
I did a trial product extract in HIKASHOP where i had set up the accesses by hand on a single item correctly and found it is the usergroup ID that i need to use in the CSV to correctly refer to customer XX and I then use all the other groups in a string for "general" sales.

I have trialled a few versions of CSV format and managed to break most of our products in the process by not getting the correct CSV loaded to the correct products in hikashop. This is particularly true on products with many variants (that have historically worked successfully to date)

I do however keep getting lots of new individual products being created for what are actually variants when i run the mass action which results with a "grey tag" icon and I subsequently lose all the variants on the products - presumably because i now have duplicate items for everything.

Our original CSV file used the following fields:
product_code
price_value
price_currency_id
price_min (always set to 1)
price_access (always set to "1,12,13,6,7,2" - all our general groups of users)

I believe our CSV will need to add:
product_access (this will be a string detailing product visibility to different customers)
price_access (this will be a string detailing price visibility to different customers)
price_value (this will be a string detailing pricing to different customers)

The strings need to contain bar characters as far as i can tell but how do i control both price and product visbility at the same time?

I can't work out what the formatting of the relevant text strings needs to be though to get the right price to show to the right customer in all the above scenarios.

The CSV I am creating currently contains 2 rows when dealing with Scenario 4 though and I don't think this is right.
As shown above, I think i need to be using a longer string for price, price_access and product_access but cant work out how to cover all my scenarios.

Apologies if I need to provide more detail to get a successful outcome on the forum but i would be grateful of any help

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
5 months 3 weeks ago #334683

As a follow up, I have found this post

And have created a CSV that looks like it should work (attached is a selected subset of rows)

However, when we originally set up the mass action with original developers we couldn't provide any parent/child relationships for hikashop as we have no way of representing this information on our systems and this seems to be something that other posts i have read seem to call for each time

I don't know how this was circumvented on the original set-up. I just know that we have to have all variants in place if we wish to upload prices to them?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 74542
  • Thank you received: 11498
  • MODERATOR
5 months 2 weeks ago #334689

Hi,

Checking your CSV the main issue I see is that you should also use the | character in the price_currency_id and price_min_quantity columns.
Basically, if you need to enter several prices for a product, you need to separate the data for each price by a | in each column starting by "price_" in your CSV.
So for example, if you have a price 27.00 for price_access ,9, and a price 46.43 for price_access ,1,12,13,6,7,2,3,4,5,8, you need something like that:

product_code;price_value;product_quantity;price_currency_id;price_min_quantity;price_access;product_access
CLY 111 001;27.00|46.43;57;GBP|GBP;1|1;,9,|,1,12,13,6,7,2,3,4,5,8,;,9,1,12,13,6,7,2,3,4,5,8,

It is possible to import products with variants data, but in that case, you need to provide extra columns for the characteristics and the product_parent_id to link the rows of variants to the row of the main product.
So maybe your SAP Business objects / Crystal reports is not able to generate such a CSV file.
In that case, you would indeed need to precreate the products and variants on the website before importing the CSV with only the product_code of all the variants / products and no product_parent_id and characteristics columns.

The following user(s) said Thank You: simonrh

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
5 months 2 weeks ago #334696

Thanks Nicolas that's great. Really, helpful

So, at it's most basic, as long as i use the "|" chracter in all fields on my CSV hikashop should pick it up cleanly.

With the variants, as long as the specific variant and part number exists already in hikashop, the CSV will upload without parent info

Can i check what precisely happens when using price and product access.

Price and product access granted to user A - Good
Product access only granted to user A - Good, will see item but no pricing
Price access only granted to user A - ??, what would happen?
No price or product access granted to user A - good, item disappears

Please Log in or Create an account to join the conversation.

  • Posts: 74542
  • Thank you received: 11498
  • MODERATOR
5 months 2 weeks ago #334715

Hi,

Not all fields. As you can see in my example, you won't want the | in the "product_" columns like product_code, or product_access, product_quantity.

If price_access is granted only to user group A and product_access is not restricted, then users will be able to access the product page, but the system won't find any price for them. By default, the price will display as "free" (can be customized to something else with a translation override), and the add to cart button might display or not based on how you configured the "display add to cart button for free products" setting in the HikaShop configuration page.

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum