Change variant name

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
1 year 11 months ago #341042

-- HikaShop version -- : 4.4.5
-- Joomla version -- : 3.10.6

Hello,

I cannot change the variant name if it is directly on the main product as a variant.
If you change a variant name off a linked product (options), this will work.
Is there any way we can get this to work?

See pdf attachment for more info (2 pages).

regards,
Michiel

Attachments:

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

  • Posts: 4508
  • Thank you received: 610
  • MODERATOR
1 year 11 months ago #341044

Hello,

We understand that this kind of configuration can sometimes seem disorienting but on the other hand it makes sense, and let me explain why:
You add a product (product B) as an option to your main product (product A), then you edit product B name
=> the option selector present the product name

2 ° You associated a characteristic to generate variant products from the main product A, and it leads to product Ab, product Ac etc...
Then, you modified the name of one of the product variant name, let's say product Ab for product Ab0 BUT when you are on the product page, this isn't the variant product name that you see in the selector, this is the characteristic value (set in Products dropdown => Characteristics).

The best demonstration is that if you choose the value relative of your changed name variant, it change the name on the product page, and you will see Product Ab0 as page title.

Hope this will be more clear in your mind anyway, we remain at your disposal for any further information.
Regards

Last edit: 1 year 11 months ago by Philip.

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

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
1 year 11 months ago #341096

Hello,

Thanks for your explanation. But is it possible to change this, because that would make the system a lot more flexible!

Regards,
Michiel

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

  • Posts: 4508
  • Thank you received: 610
  • MODERATOR
1 year 11 months ago #341098

Hello,

By a custom development almost everything is possible, but we didn't get why this will be more flexible.
If really you want have a different name in your selector, then you can edit your characteristic value (in order to modify the name).
And maybe you can have several characteristic (per product group or per product) in order to have always required name value for each product.

Regards

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

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
1 year 11 months ago #341528

Hello Philip,

I will try to explain our problem and our logic.

We have a multi-vendor shop with over 70 vendors (and growing every day)
The vendor can edit there products in the front-end where they can adjust their price and variants, but NOT the characteristic values.
We don't want to give the vendors access to the characteristic "list", because then they can change all characteristic, also from other vendors.
So if vendor A changes an existing value that is good for him, that value will also change for vendor B that created this value... and you will get very angry vendors :(

The advantage if you CAN change this name: for example vendor A and Vendor B both have the variant value "Large" and vendor A wants to make it "Big size" then vendor B will still have "Large".

Hope you understand our problem and that you can do something with this.

Regards,
Michiel

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

  • Posts: 81504
  • Thank you received: 13063
  • MODERATOR
1 year 11 months ago #341530

Hi,

Ok, now I can see why you want to do this.
So I see two ways to do this:
- it would be to have a specific ACL in HikaMarket to allow vendors to add their own values to characteristics without allowing them to modify the default values or the values of other vendors.
- it would be to develop a custom plugin implementing the onAfterVariantChecked(&$variant, &$element) event of HikaShop to modify the characteristics values to use the name of the corresponding variant.

The first approach will require extra checks to be implemented here and there and the interface to be adapted on the frontend characteristic edition. An extra column will also need to be added in the characteristic table to link values added by vendors to the corresponding vendor entry in the vendor table. The backend characteristic edit interface would also have to be modified to take this vendor link into account. And even an extra check in the backend product edition would be necessary to check that you're not using the value of a vendor for a product or variant linked to another vendor etc.
The second approach is simpler as it will only require a small plugin to be developed (so it would cost less and be faster to implement). However, the drawback is that this can only work for when products always only have one characteristic. If they have more than one characteristic, then you will have several variants which will match for the same value of a characteristic in each product and thus it's a logical problem since on one side we have one characteristic value text to replace, and on the other side we have several variants' name usable for that replacement.

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

  • Posts: 386
  • Thank you received: 7
  • Hikashop Business
1 year 11 months ago #341763

Hello,

thank you for thinking along!
It would have been nice to have this option as standard, but unfortunately....

Now we are on further research regarding the options.
I now have several products on which I hang a size normal and large. Where the additional cost must be stated in the display... so I have to do that with options.
For example:
1. Normal
2. Large (+2.50)

But because I have different prices for the large, I have to create different options. And because the label is "Formaat" everywhere... I don't see any difference when pairing an option!


We have already created a custom field that is shown in the backend AND for the verdor is visible on the frontend.
Backend:

Front-end


Is there any way we can tell these options with the same label apart? A nice solution would be to show the custom field behind it...


We try to help make Hikashop even better ;) :silly:
Regards,
Michiel

Attachments:

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

  • Posts: 81504
  • Thank you received: 13063
  • MODERATOR
1 year 11 months ago #341764

Hi,

In the file product / form that you can edit via the menu Display>Views, you have this code to display the options selector:

	if(hikashop_acl('product/edit/options')) { ?>
			<dt class="hikashop_product_options"><label for="data_product_options_text"><?php echo JText::_('OPTIONS'); ?></label></dt>
			<dd class="hikashop_product_options"><?php
				if(hikashop_level(1)) {
					echo $this->nameboxType->display(
						'data[product][options]',
						@$this->product->options,
						hikashopNameboxType::NAMEBOX_MULTIPLE,
						'product',
						array(
							'delete' => true,
							'sort' => true,
							'default_text' => '<em>'.JText::_('HIKA_NONE').'</em>',
						)
					);
				} else
					echo hikashop_getUpgradeLink('essential');
			?></dd>
<?php
	}
There, after the line:
'default_text' => '<em>'.JText::_('HIKA_NONE').'</em>',
try adding the line:
'displayFormat' => '[{product_id}] {product_name} {xxx}',
where xxx is the column name of that Notitie custom field and it should appear in the opions selector.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum