Characteristics with an Image

  • Posts: 41
  • Thank you received: 1
3 years 11 months ago #318378

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18

I have created a characteristic that displays in the front end as an image with text (a white circle with the word "white" next to it). When you select the characteristic, the image and text displays next to the product name in the front end. Is there a way that I can use an image as a characteristic, but only get the text to display in the product name above?



Reason it concerns me is that I use ShipStation and with the image in the product line, ShipStation won't import the order because that product line is longer than their allowed number of characters as a product name. Simply put, the order won't be imported into ShipStation unless I go into the order in the Hika backend administration and edit the order by removing the characteristic image code and leaving the text "white" alone. I really didn't want the image in the product name before, but kept it to make my life easier. Now that ShipStation won't import certain orders with these products in it, I need to address that issue now.

Thanks!

Attachments:

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

  • Posts: 81484
  • Thank you received: 13062
  • MODERATOR
3 years 11 months ago #318382

Hi,

I don't think that's the way to go about it.
First, the tags in the product name are automatically removed by the ShipStation plugin. So removing the image from the name shouldn't change anything.
However, what I can see is that there is a limit of 200 characters for the product name.
In that case, I would rather recommend to change the line:

<Name><![CDATA[' . (string)strip_tags($product->order_product_name) . ']]></Name>'.
to:
<Name><![CDATA[' . substr((string)strip_tags($product->order_product_name),0,200) . ']]></Name>'.
in the file plugins/system/shipstation/shipstation.php
That way, even if the number of characters of the product is longer than 200 characters, it will be cut after that when sending the data to ShipStation.

The following user(s) said Thank You: wild4gsus

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

Time to create page: 0.065 seconds
Powered by Kunena Forum