Name of variant in db order_product_name

  • Posts: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
9 years 3 months ago #211263

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.x
-- PHP version -- : 5.6
-- Error-message(debug-mod must be tuned on) -- : no errors

Hello,

We have made an soap call to our accounting, it works fine.
But however, calling the database field (order_product_name) gives the name of the order, but when ordering a variant we get this information:
Visitekaartjes 350 grams mat mc-papier<span class="hikashop_product_variant_subname">: 500 stuks</span>
How can we make it so that we don't have the <span class="hikashop_product_variant_subname">: 500 stuks</span>
shown in the order_product_name.
Thanks.

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 3 months ago #211264

Hi,

The "order_product_name" is the product name of the item when the order has been created.
So I'm not sure to follow you for your sentence

calling the database field (order_product_name) gives the name of the order


About the HTML content added for the variants, the best is to perform a "strip_tags"
php.net/manual/en/function.strip-tags.php

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: 410
  • Thank you received: 9
  • Hikaserial Subscription Hikashop Business
9 years 3 months ago #211387

let me try to explain..
in the order confirmation, see image: confirmationimage.png u see under Omschrijving the name of the product / variant.
Product is HIOW Basis Website "Variant" is H003
When a customer have ordered this product it will go to our accounting system via soap call to there api ..
But on the invoice created by the accounting we get the following.. see pdf file, this is an order of the product then with variant H001
HIOW basis website<span class="hikashop_product_variant_subname">: H001</span> H001
The data for this we call directly from the database and that is from the hikashop_order table the row order_product_name. The <span class is also in the database.. and we would like to get this out so both the order confirmation mail and the invoice will look neatly.
Hope my english is good enough for you to understand.

Thanks.

Attachments:

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

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
9 years 3 months ago #211395

Hi,

As Jerome explained, it's normal that you have the HTML tag <span class="hikashop_product_variant_subname">: H001</span> in the order_product_name of the database.
You should leave it like that. Instead, when you generate the PDF, you should add a strip_tags on the order_product_name you're using so that it would remove it during the generation of the PDF. That's what HikaShop does when it generates the invoice from the backend of HikaShop, or sends the name of the product to payment gateways, etc.

Now if you really want to remove it from the database field, you can alsways hack the code of HikaShop to do it by changing the line:
$orderProduct->order_product_name = $product->product_name;
to:
$orderProduct->order_product_name = strip_tags($product->product_name);
in the file components/com_hikashop/controllers/checkout.php but I don't recommend it and rather recommend it doing it when displaying the information in the invoice.

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

Time to create page: 0.060 seconds
Powered by Kunena Forum