3

My developer has written PHP code on his CMS that connects via SOAP on behalf of the user browsing the site, to manage the cart from their CMS.

I'm worried about the interaction of SOAP session (which owns the cart), frontend session (when the user finally gets to Magento), CMS session (which stores the SOAP session), the eventual "logged in" session if the user has an account

Do I need to be worried or is this actually a perfectly normal scenario?

I have a content site developed by an agency on their in house CMS which needs to integrate with a new Magento site

They are trying to build elements which show products within the cms, including an "add to cart" and a mini cart (ajax)

They are not Magento developers, just general PHP (cake) developers and at the moment the solution is a bit clunky and worries me:

  • product information copied over SOAP API to be available within the Cake CMS, nightly or on demand(that part does not worry me beyong mapping maintenance)

  • locally built Cake "cart" view which connects to Magento to add/edit cart over SOAP. Note that at this point shoppers are usually "guests"

  • when the customer clicks "checkout" they are taken to the Magento checkout pages to continue/finish in Magento, as guest or with log in.

it is the Cake->Magento cart over soap part that worries me. All the use cases for this are for an admin person to be creating an order, not for the user to be adding to cart as guest from another page.

SOAP is using its own API session (using a particular user), this session is stored for reuse in the Cake system (so the user's cart is stored in the cake CMS session via a SOAP session cookie which is passed to the cart and checkout links).

Because this is "php to Magento" I'm not sure the frontend session gets created/passed correctly (or different ones created) and I have no idea what happens when there are many visitors using this (all with same API user), and what happens when they log in to their Magento account too.

At first glance products are indeed added to cart properly but the more I look at it the more I worry there could be session collisions, session loss, etc

For one products added within Magento (say from a cart/checkout upsell) do not appear in the SOAP version of the cart, and I have also been unable to get them to make grouped products added as group products (see Magento SOAP API Add to cart, how to add a grouped product?)

I'm worried about the interaction of frontend session, cake session, SOAP session and the eventual user account login - but do I need to be worried or is this actually a perfectly normal scenario

PS: I hat assumed they would build it to use HTML and Javascript, with the add to cart created so that it submits direct to Magento (and later perhaps via Ajax) & the mini cart Javascript as well, but having spend the day exploring around these I am not seeing a clear path

PPS: What I really need is to be able to create clean "add to cart" buttons that work, including for grouped product, knowing the IDs - and to pull and display the cart via Ajax. Not having much luck with either SOAP, PHP or Magento module so far.

0

Clearly your developers have invested a lot of work in doing a SOAP API type of call and replicating the Magento database within their CMS.

There is a tendency for people to think that the universe revolves around what they do, so the accounts people think the world revolves around their accounting system and not Magento, you also have people that run newsletters think that the world revolves around their email system, not Magento. You can also get third party developers want to embed Magento in their little CMS - e.g. Wordpress, whereas a seasoned Magento developer would want to do it the other way around with Wordpress content brought through into Magento and not the other way around.

I would be very inclined to review the design decisions that have been made on your site and to be realistic about what is so wonderful about thew third party CMS and whether you want to be building an essentially unmaintainable system. Yes anything is possible in code given unlimited time and budget, however, 'keep it simple' is a better starting point than 'make it complicated'.

  • yes, I didn't like their choices - they just wanted it to use their built in cart and behind the scenes build the magento 1, whereas I would bypass their cart altogether, just do Ajax to the magento structure... But doing what I wanted to be done in Magento1 even buying with modules is crazy work, alas. I let it be and hope that content is more "mix and match" able in Magento2, though my early tests show a lot of gaps of magento1 remain in magento2 :( – iphigenie Sep 9 '17 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.