Keyword

update params of item based upon params of another

  • dotted i
  • dotted i's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 months ago #130520 by dotted i
I am trying to synchronize the params of a category based upon the params of an item that is the model.

This does not work, is not valid mysql:
update p3h0i_k2_items set params = (select params from p3h0i_k2_items where id = 300) where id = 278;

Item ID 300 is the role model for params. I want to first test it by updating the params of a single item, then if it works, go for the category, something like:
update p3h0i_k2_items set params = (select params from p3h0i_k2_items where id = 300) where catid = 100;

What is the correct mysql syntax to make this work?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago #130521 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: update params of item based upon params of another
I do not think this is the optimal solution, quite the contrary actually.

Create a new category called eg: Setup Category, and then apply all the correct settings.
Now set all the categories you want to edit to inherit all their values from the setup category.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • dotted i
  • dotted i's Avatar Topic Author
  • Offline
  • New Member
More
10 years 2 months ago #130522 by dotted i
That will not work. The content administrators have been customizing the changes to individual items which overrides the category settings.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 2 months ago - 10 years 2 months ago #130523 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: update params of item based upon params of another
The default params are:
{"catItemTitle":"","catItemTitleLinked":"","catItemFeaturedNotice":"","catItemAuthor":"","catItemDateCreated":"","catItemRating":"","catItemImage":"","catItemIntroText":"","catItemExtraFields":"","catItemHits":"","catItemCategory":"","catItemTags":"","catItemAttachments":"","catItemAttachmentsCounter":"","catItemVideo":"","catItemVideoWidth":"","catItemVideoHeight":"","catItemAudioWidth":"","catItemAudioHeight":"","catItemVideoAutoPlay":"","catItemImageGallery":"","catItemDateModified":"","catItemReadMore":"","catItemCommentsAnchor":"","catItemK2Plugins":"","itemDateCreated":"","itemTitle":"","itemFeaturedNotice":"","itemAuthor":"","itemFontResizer":"","itemPrintButton":"","itemEmailButton":"","itemSocialButton":"","itemVideoAnchor":"","itemImageGalleryAnchor":"","itemCommentsAnchor":"","itemRating":"","itemImage":"","itemImgSize":"","itemImageMainCaption":"","itemImageMainCredits":"","itemIntroText":"","itemFullText":"","itemExtraFields":"","itemDateModified":"","itemHits":"","itemCategory":"","itemTags":"","itemAttachments":"","itemAttachmentsCounter":"","itemVideo":"","itemVideoWidth":"","itemVideoHeight":"","itemAudioWidth":"","itemAudioHeight":"","itemVideoAutoPlay":"","itemVideoCaption":"","itemVideoCredits":"","itemImageGallery":"","itemNavigation":"","itemComments":"","itemTwitterButton":"","itemFacebookButton":"","itemGooglePlusOneButton":"","itemAuthorBlock":"","itemAuthorImage":"","itemAuthorDescription":"","itemAuthorURL":"","itemAuthorEmail":"","itemAuthorLatest":"","itemAuthorLatestLimit":"","itemRelated":"","itemRelatedLimit":"","itemRelatedTitle":"","itemRelatedCategory":"","itemRelatedImageSize":"","itemRelatedIntrotext":"","itemRelatedFulltext":"","itemRelatedAuthor":"","itemRelatedMedia":"","itemRelatedImageGallery":"","itemK2Plugins":""}

Try setting all the items params row to this.
Be sure to backup first.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum