Characteristics and Variants with custom pricing

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 3 months ago #123448

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.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 56
  • Thank you received: 0
11 years 3 months ago #123455

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:

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:
$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:
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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #123796

Hi,

Thanks to add the following code before the line 1401:

if(!is_array($characteristicColumns)) $characteristicColumns = array($characteristicColumns);
And this one before the foreach:
if(!is_array($ids)) $ids = array($ids);

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

  • Posts: 56
  • Thank you received: 0
11 years 3 months ago #123887

I've made your edits and now I get the error message:

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:
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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #123918

In that case the code needed is probably:

if(!is_array($oldElement )) $oldElement = array($oldElement );

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

  • Posts: 56
  • Thank you received: 0
11 years 3 months ago #124052

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #124091

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.

  • Posts: 56
  • Thank you received: 0
11 years 3 months ago #124225

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #124240

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #124370

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 3 months ago #124390

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.

  • Posts: 56
  • Thank you received: 0
11 years 3 months ago #124793

Is it supposed to be working now? I ran it and nothing changed. I received a whole new slew of errors.

CSV File

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: 11 years 3 months ago by Lutya.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #124874

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:

Attachments:

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

  • Posts: 56
  • Thank you received: 0
11 years 2 months ago #125002

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?

price_value;product_published;product_code
130;1;”Rs-12Lg_17_49”

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

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #125057

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.

  • Posts: 56
  • Thank you received: 0
11 years 2 months ago #125144

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.102 seconds
Powered by Kunena Forum