Action to copy description to meta description

  • Posts: 127
  • Thank you received: 1
9 years 3 days ago #224983

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.7
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Safari 9.0.1

Hello,

I am needing to copy the first part of the product's description to the meta description field and I am wondering if this can be done with a mass action or if a MySQL query would be needed. Also, can a limit be placed on the length of text copied over? Any help is greatly appreciated. Thank you.

Mike

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

  • Posts: 2143
  • Thank you received: 747
9 years 3 days ago #224986

Hi,

Have you noticed and tried what's already available "out of the box"? In the HikaShop backend -> System -> Configuration -> tab Features -> SEF url options, please look at the options "Automatic product keywords and metadescription filling" and "Maximum size of the metadescription". Is that perhaps what you need?


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Jerome

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

  • Posts: 127
  • Thank you received: 1
9 years 3 days ago #224992

Hello,

I have seen this option and it is enabled, but it only works if you go in and save each product individually. I have hundreds of products already created and I do not want to go through this process. Also, this automatic option seems to convert all of the text to lowercase letters, which is not helpful for meta descriptions. It is fine for meta keywords, but those are no longer used by Google.

Mike

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 days ago #224996

Hi,

Thanks to the mass actions you can automatically set the "product_meta_description" from the "product_description", this will keep the upper-cases but you can't set a description length, it will be automatically cut after 255 characters and the html tags will be present.

So to set a description lenght and not have the html tags, it will require custom code.
The creation of a mass action for example, you can create a new plugin, take the existing version of the "onProcessProductMassActionupdateValues()" then paste it and adapt it in the plugin.

www.hikashop.com/support/documentation/s...s-action-plugin.html

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

Time to create page: 0.076 seconds
Powered by Kunena Forum