Developer forum

Forum » Swift » Back in stock notification on a swift 1.16

Back in stock notification on a swift 1.16

Søren Jakobsen
Reply

Hi,

I'm about to implement a back in stock notification at a swift 1.16.

Is it possible to follow below guide on a swift? 

https://doc.dynamicweb.com/documentation-9/marketing/other/back-in-stock-notifications

The template ex. uses templatetags. Are the same data/tags available on the swift product viewmodel (ex. product.GetBoolean("Ecom:Product.NotificationRegistered")?

Best regards

Søren


Replies

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Soren,

 

There are some differences. We've actually implemented it already using Components. Those view model properties are not available because they are context related (to the logged in user), so not part of the ViewModel.

 

We created some Components:

  • Back in Stock Notification - For Components and Product detail page
  • Back in Stock Notification Product Catalog - For the Emails/Newsletters

 

I can share our code so you can also use it and kick the tires. Would be nice to have a second opinion too if you are interested and can share.

 

Best Regards,

Nuno Aguiar

 
Søren Jakobsen
Reply

Hi Nuno,

much appreciated. Please share and I will give you my opinion.

Thanks

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Nuno,

I am also interested about it. We have to start implementing something on a new project.

Thank you,
Adrian

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Sure, here you go guys:

 

  • In the Swift_ProductComponentEdit you need to set the SwiftRizzo_BackInStockNofitication as allowed Child
  • I am sending the js both in minified and non-minified version
  • Use Permissions if you don't want anonymous users to have access to it

 

As a Bonus, I'm also attaching the templates for setting the Email Marketing using the latest Emails (already available in v1.16) You can find:

  • The Paragraph Item type SwiftRizzo_BackInStockNotificationProductCatalog that needs to be an allowed child in Swift_Email
  • The Product Catalog list template
  • So to set it up you have to
    • Add the new paragraph item type as a "column" in a row of an email
    • Add the Product Catalog App
    • ... the same instructions that Soren mentioned, but picking the template provided in the zip file

 

Let me know if you run into any issues and how it goes.

 

Best Regards,

Nuno Aguiar

 
Søren Jakobsen
Reply

Thanks Nuno,

I have implemented the back in stock notification on a DW Swift solution.

I think I will add an extra text message to the itemtype. Just some info to be rendered either before or after the notification button and do some changes to not displaying the add to cart button. But otherwise, the solution works perfect right out of the box.

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Søren,

 

Awesome. Hope you make a good use of it.

 

Nuno

 

You must be logged in to post in the forum