- Posts: 203
- Thank you received: 16
Placing a URL in the product descriptions
- smithshop123
-
Topic Author
- Offline
Less
More
8 years 6 months ago #290004
by smithshop123
Placing a URL in the product descriptions was created by smithshop123
-- HikaShop version -- : 3.3.0
-- Joomla version -- : 3.8.6
-- PHP version -- : 5.6.34
-- Browser(s) name and version -- : opera 51.0.2830.55
Hi,
we have 2 licenced Hikashop sites and would like to include a standard clickable URL in the description field of one of the sites to the other. This so we only have to have one working checkout (we also have 2 separate physical shops).
We'd prefer to do this as a mass action and would like to know how to format the string (we know how to do text only).
Many thanks,
Ian and Stu
-- Joomla version -- : 3.8.6
-- PHP version -- : 5.6.34
-- Browser(s) name and version -- : opera 51.0.2830.55
Hi,
we have 2 licenced Hikashop sites and would like to include a standard clickable URL in the description field of one of the sites to the other. This so we only have to have one working checkout (we also have 2 separate physical shops).
We'd prefer to do this as a mass action and would like to know how to format the string (we know how to do text only).
Many thanks,
Ian and Stu
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290011
by nicolas
Replied by nicolas on topic Placing a URL in the product descriptions
Hi,
The mass actions system allows you to concatenate strings in the "update the values" action in operation mode, but it doesn't allow for HTML, for security reasons.
So I'm afraid you'll have to do that with a MySQL query in your PHPMyAdmin.
It's however quite easy... Something like that:
UPDATE #__hikashop_product SET product_description = CONCAT(product_description, 'MyHTML');
The mass actions system allows you to concatenate strings in the "update the values" action in operation mode, but it doesn't allow for HTML, for security reasons.
So I'm afraid you'll have to do that with a MySQL query in your PHPMyAdmin.
It's however quite easy... Something like that:
UPDATE #__hikashop_product SET product_description = CONCAT(product_description, 'MyHTML');
Please Log in or Create an account to join the conversation.
- smithshop123
-
Topic Author
- Offline
Less
More
- Posts: 203
- Thank you received: 16
8 years 6 months ago #290091
by smithshop123
Replied by smithshop123 on topic Placing a URL in the product descriptions
Hi,
I'll get someone to do this for use but would our new description with the link in it replace 'MyHTML' in your example?
Thanks,
Ian and Stu
I'll get someone to do this for use but would our new description with the link in it replace 'MyHTML' in your example?
Thanks,
Ian and Stu
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290103
by nicolas
Replied by nicolas on topic Placing a URL in the product descriptions
Hi,
Since it's a concatenation, what you put instead of "MyHTML" will be added at the end of the product_description you already have in each product.
Since it's a concatenation, what you put instead of "MyHTML" will be added at the end of the product_description you already have in each product.
Please Log in or Create an account to join the conversation.
- smithshop123
-
Topic Author
- Offline
Less
More
- Posts: 203
- Thank you received: 16
8 years 6 months ago #290190
by smithshop123
Replied by smithshop123 on topic Placing a URL in the product descriptions
Hi,
it comes back with a syntax error when I just try the word 'test' instead of 'MyHTML'.
Regards,
Ian and Stu
it comes back with a syntax error when I just try the word 'test' instead of 'MyHTML'.
Regards,
Ian and Stu
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290205
by Jerome
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.
Replied by Jerome on topic Placing a URL in the product descriptions
Hello,
What syntax error ?
You can "concat" any content you want but you need to be sure that the content is right escaped and between quotes.
Do not hesitate to look for some MySQL documentation or tutorial to escape and quote your content correctly.
Regards,
What syntax error ?
You can "concat" any content you want but you need to be sure that the content is right escaped and between quotes.
Do not hesitate to look for some MySQL documentation or tutorial to escape and quote your content correctly.
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.
- smithshop123
-
Topic Author
- Offline
Less
More
- Posts: 203
- Thank you received: 16
8 years 6 months ago #290207
by smithshop123
Replied by smithshop123 on topic Placing a URL in the product descriptions
Hi,
it's;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I'll ask a friend who know a bit about sql to take a look.
Thanks,
Ian and Stu
it's;
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
I'll ask a friend who know a bit about sql to take a look.
Thanks,
Ian and Stu
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290233
by Jerome
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.
Replied by Jerome on topic Placing a URL in the product descriptions
Hello,
Generally, we recommend you use backslashes.
stackoverflow.com/questions/887036/how-t...ngle-quotes-in-mysql
Regards,
It means that you have quotes in your content and you need to escape it.near '' at line 1
Generally, we recommend you use backslashes.
stackoverflow.com/questions/887036/how-t...ngle-quotes-in-mysql
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.
- smithshop123
-
Topic Author
- Offline
Less
More
- Posts: 203
- Thank you received: 16
8 years 6 months ago #290263
by smithshop123
Replied by smithshop123 on topic Placing a URL in the product descriptions
Hi,
escaping the characters results in the same error. If I select 'update' from the phpadmin interface it gives me;
UPDATE `mus_hikashop_product` SET `product_description`=[value-4] WHERE 1
Can I adapt this?
Thanks,
Ian and Stu
escaping the characters results in the same error. If I select 'update' from the phpadmin interface it gives me;
UPDATE `mus_hikashop_product` SET `product_description`=[value-4] WHERE 1
Can I adapt this?
Thanks,
Ian and Stu
Please Log in or Create an account to join the conversation.
8 years 6 months ago #290265
by nicolas
Replied by nicolas on topic Placing a URL in the product descriptions
Hi,
It's the same in PHPMyAdmin:
UPDATE `mus_hikashop_product` SET `product_description`=concat(product_description, 'MyHTML') WHERE 1
It's the same in PHPMyAdmin:
UPDATE `mus_hikashop_product` SET `product_description`=concat(product_description, 'MyHTML') WHERE 1
Please Log in or Create an account to join the conversation.
- smithshop123
-
Topic Author
- Offline
Less
More
- Posts: 203
- Thank you received: 16
8 years 6 months ago #290289
by smithshop123
Replied by smithshop123 on topic Placing a URL in the product descriptions
Thanks Nicolas. That worked!
Kind regards,
Ian and Stu
Kind regards,
Ian and Stu
Please Log in or Create an account to join the conversation.
Time to create page: 0.245 seconds