Search

How to update an entry of a section (A) when another section (B) entries are updated ?

Maybe I can get the updates from section B with WebHooks extension but I have no idea how to update the section.

I'm still new in Symphony, there is probably a better way to do this ;)

Hi @tigo,

Would definitely help to understand your workflow - just in case there is a more straight forward way to approach it! What's your section setup?

I'm not personally sure how I'd achieve what you're after, but I'm also struggling to imagine a scenario where I'd need to, so if nothing else I'd be interested to see it :)

Hello @nathanhornby, i have a section Order Items with Price field and always after any changes ( add items, delete items, price changes of item in Order ) I want the sum of the prices of the items and save this result in the Price Total field in the section Orders.

Thanks for your attention!

//ps: my english is more or less, sorry :)

Amusingly I was going to suggest such a scenario as an example, except with stock levels :)

This is indeed an interesting dilemma. I can think of different ways to approach it, but nothing that doesn't change things significantly, like outputting orders in a frontend area where you have more room for applying logic to the data.

Someone more experienced than myself might have some ideas though, your issue is at least very clear.

I hope this will go a long way to helping.

It's the only source I know for this article, although I'm sure it was put on this site some time ago.

Hope it helps!

Events Tutorial

WebHooks + REST API solve it... but, at this moment, WebHooks don't works with Symphony 2.4. I fixed a little part but WebHooks needs to be remake from scratch.

Thanks @designermonkey, i will study your link.

REST API don't works too :(

Symphony Warning: simplexml_load_string() expects parameter 1 to be string, object given

148 public function sendOutput($xml) {
149
150 $dom = simplexml_load_string($xml);
151 switch(REST_API::getHTTPMethod()) {
152 case 'get':
153 $xml = $dom->xpath('/data/response');
154 if(is_array($xml)) $xml = reset($xml); 

I tried to convert this object but I did not succeed.

Maybe I should open up another discussion for this.

Are you using Symphony 2.4? If so, then it's more likely an issue that the extension hasn't been updated yet.

@designermonkey - I think that was @tigo's point :)

Unfortunately the vast majority of extensions haven't. Definitely worth checking the Github repo's, if you haven't already, as many extensions seem completely unmaintained and there are some pull requests that update the extensions for 2.4 compatibility.

@designermonkey yes, 2.4 ( tested with master and integration branch ).

@nathanhornby Unfortunately is true, many extensions are abandoned.

No one has an obligation to be keeping them but the lack of updates is a crucial point about using or not new versions of Symphony.

I'm trying to learn to collaborate (until that moment made an ugly workaround for order entries) but have a lot to learn.

Symphony needs more people, more developers =)

Fortunately most of the needed extension changes are minimal - I've issued pull requests for several, if I can fix them they're simple issues :)

But I do agree, major extension updates should be coordinated with the core release, else you cant use it anyway!

One step was made... there is an new PR for REST API wich works very well with Symphony 2.4 -> https://github.com/koolaid1551/rest_api

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details