Skip to main content

Characteristics and Variants with custom pricing

More
13 years 1 month ago #123448 by Jerome
Hi,

I am trying to reproduce your problem but in fact, I don't know what's the real configuration of your mass action.
I don't know what you have configured and I am also some problem to understand what you want to do exactly.
If you can wait a little, Xavier and Nicolas will be available begin of next week. Since they come back, I will be the only one who will be able to help you and I don't want to make you "repeat" all.
I am not very familiar with the "mass action". But Xavier and Nicolas are :)

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

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

More
13 years 1 month ago #123455 by Lutya
Thank you Jerome,

I don't mind waiting, I really do need to get this resolved.

Just to recap:

Issue:

Trying to update the price of several particular variants through mass action. Rings of every color size 11-15 need to have different prices than the product's main price.

This is the product that needs to be updated.

This is a screen shot of the products variant screen.

This is a screen shot of the main product screen.

Here is the CSV file I am trying to use.

Problem:

When I attempt to process my mass action I get errors and the mass action doesn't update the price on my variant.

Here is my Mass Action configuration.

Here are the errors I get when I attempt to process the Mass Action:
Code:
Warning: array_merge() [function.array-merge]: Argument #4 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/massaction.php on line 1401 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/massaction.php on line 1402 Warning: Invalid argument supplied for foreach() in /home/content/98/10133298/html/bellaraejewelry/plugins/hikashop/massaction_product/massaction_product.php on line 250

Here is the code that appears on massaction.php line 1401 & 1402:
Code:
$mergedColumns = array_merge(array_keys($productColumns),array_keys($priceColumns),$categoryColumns,$characteristicColumns,$otherColumns); $wrongColumns = array_diff($columns,$mergedColumns);


Here is the code that appears on massaction_product.php line 250:
Code:
foreach($ids as $i => $id){ $oldElement = $productClass->products[$id]; if(!empty($data->elements[$id]->price_value)){ $data->elements[$id]->prices = array(); $price_values = explode('|',$data->elements[$id]->price_value); $price_currencies = explode('|',$data->elements[$id]->price_currency_id); $price_min_quantities = explode('|',$data->elements[$id]->price_min_quantity); $price_accesses = explode('|',$data->elements[$id]->price_access);

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

More
13 years 1 month ago #123796 by Xavier
Hi,

Thanks to add the following code before the line 1401:
Code:
if(!is_array($characteristicColumns)) $characteristicColumns = array($characteristicColumns);
And this one before the foreach:
Code:
if(!is_array($ids)) $ids = array($ids);

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

More
13 years 1 month ago #123887 by Lutya
I've made your edits and now I get the error message:
Code:
Warning: Invalid argument supplied for foreach() in /home/content/98/10133298/html/bellaraejewelry/plugins/hikashop/massaction_product/massaction_product.php on line 363

The code for line 363 is:
Code:
foreach($oldElement as $k => $old){ foreach($data->elements[$id] as $l => $new){ if($k == $l){ $elements[$i]->$k = $new; } }

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

More
13 years 1 month ago #123918 by Xavier
In that case the code needed is probably:
Code:
if(!is_array($oldElement )) $oldElement = array($oldElement );

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

More
13 years 1 month ago #124052 by Lutya
I'm not sure if this is what you intended, but I added the code you suggested before line 363 and kept the code you had me change previously. Now, when I process it, I don't get any errors but the changes aren't made.

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

More
13 years 1 month ago #124091 by Xavier
Sorry, the code given was to remove the errors.
In your case I think that your csv file is not well formated.

Thanks to remove the double quote for the column titles, and separate the elements by ";" instead of a comma.
In the massaction screen, thanks to click on the button "verify the file" and see what message is returned, it will probably help us to solve the problem.

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

More
13 years 4 weeks ago #124225 by Lutya
I tried removing all " from the first line and swapped out the , for ; with no result. Next I also added ; to the end of each line in case that made a difference, it did not. From the very beginning I have been running the "Verify the File" option with every change I try and have never gotten anything besides "The file is valid"

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

More
13 years 4 weeks ago #124240 by Xavier
Thanks to give us a backend and a ftp access to debug the problem.

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

More
13 years 4 weeks ago #124370 by Xavier
Hi,

I was working on your problem and I can't no more connect on the FTP, maybe an auto ban.
Thanks to check that.

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

More
13 years 4 weeks ago #124390 by Xavier
I have made some modifications in the code, and it seems to be working, some errors are displayed but it's not important for the moment.

I will improve the system on our end and it will be in a future release.

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

More
13 years 3 weeks ago - 13 years 3 weeks ago #124793 by Lutya
Is it supposed to be working now? I ran it and nothing changed. I received a whole new slew of errors.

CSV File
Code:
Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933 Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 916 Warning: array_diff() [function.array-diff]: Argument #2 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 917 Warning: array_diff() [function.array-diff]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 918 Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/content/98/10133298/html/bellaraejewelry/administrator/components/com_hikashop/classes/product.php on line 933
Last edit: 13 years 3 weeks ago by Lutya.

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

More
13 years 3 weeks ago #124874 by Xavier
Hi,

Yes actually it's normal, it's temporary until I fix that on our end and it appear in a future release.
I checked the result and the variants seems to have the price changed as you can see in this screenshot:

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

More
13 years 3 weeks ago #125002 by Lutya
I saw that, but I was having some issues with the currency so I had to delete the variants and recreate them. So I had to make a new csv file. Now I run the mass action and I get no errors and the variants aren't updated. Did you use a different format in the csv than the following?
Code:
price_value;product_published;product_code 130;1;”Rs-12Lg_17_49”

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

More
13 years 3 weeks ago #125057 by Xavier
Yes, I removed the ”, I think that it's causing an error.
Sorry I forgot this thing.

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

More
13 years 3 weeks ago #125144 by Lutya
Thank you soooo much! It seems to be working correctly now.

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

Time to create page: 0.260 seconds
Powered by Kunena Forum