1. ptrouw
  2. RO CSVI
  3. Friday, 08 September 2017
  4.  Subscribe via email
I am trying to import a product with multiple categories and child categories. Some 2 years ago you pointed out a work around for this problem.

This is what i try to:
product_sku^category_path
ALF147CS^Alfa Romeo[147 | 2000-2010{- All products[Car window shades{- All products[Car Shades

So you mentioned changing 1 line of code in /com_csvi/addon/com_virtuemart/model/import/product.php
ORG
$category_ids[$name] = explode("[", $value);
CHANGED TO
$category_ids[$name] = explode("{", $value);

This worked until 7.1 or 7.2 now with 7.3. I am getting 4 NEW categories added, instead of adding to existing categories.
147,
2000-2010{- All products,
Car window shades{- All products
Car Shades

Any idea what has changed recently in the csvi code why this doesn't work any more?
Accepted Answer Pending Moderation
Hello,

I wonder why you even need to apply core hacks. The category separator can be set in the template settings as well. So multiple categories are separated by the |-symbol and child categories are separated by the /-symbol. The child category separator can be set in the template on the Options tab as Category separator.

The plugin files are no longer copied to the administrator folder but now remain where they are in the plugins/csviaddon/virtuemart/com_virtuemart. So the file you changed I would assume is no longer used.
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
Hi Roland,
"....|-symbol and child categories are separated by the /-symbol. The child category separator can be set in the template on the Options tab as Category separator...."
But that is the catch, in our Category title there is an "|" already, The child category separator I know.
With example below, you can see that in child category the name is "147 | 2000-2010".
product_sku^category_path
ALF147CS^Alfa Romeo[147 | 2000-2010{- All products[Car window shades{- All products[Car Shades

That is why we used the core hack!
Any ideas?
  1. more than a month ago
  2. RO CSVI
  3. # 2
Accepted Answer Pending Moderation
Hello,
As Roland already said the file product.php in new version is in a different location, that could be one cause that your fix is not working anymore. You can look for the file at location plugins/csviaddon/virtuemart/com_virtuemart/model/import/product.php and try doing the same fix and see 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. # 3
Accepted Answer Pending Moderation
Hello,

But that is the catch, in our Category title there is an "|" already, The child category separator I know.
The only workaround for this would be to use the HTML symbol in your categories. That is written as
|
. If that is not possible, then a template override is the only other option.
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. # 4
Accepted Answer Pending Moderation
Thx work around works.
I will also try with |. But I think, that "|" should be allowed as character in category name.
  1. more than a month ago
  2. RO CSVI
  3. # 5
Accepted Answer Pending Moderation
Hello,
If the change in product.php file works then you can set it as an override in CSVI so you don't have to worry about any updates.

I will also try with |. But I think, that "|" should be allowed as character in category name.

Since CSVI uses | this as a category separator you cannot use the symbol directly and so Roland suggest to use it as HTML characters.
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
  • Page :
  • 1


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