Creating customizable products in your Shopify store not only increase your customer satisfaction, it also increases your conversion rate. Here is a method to add custom options for your Shopify product and convert it into personalized product - Go to Shopify store page and search for "Advanced Product Customizer" app or you can directly the the Shopify app page by clicking on this link Advanced Product Customizer . Install Advanced Product Customizer app for free in your Shopify store From the application dashboard, enable to app embed block to complete the installation process Click "Product Custom Options" From the Shopify products list, select the product on which you want to add custom options. Advanced Product Customizer offers Image Swatch, Color Swatch, Text box, File Upload, Radio, Checkbox, Date Picker and more. Here is the a demo video for adding custom option for a Shopify product -
Convert content of XML file to JSON string in C#.Net
The below function will convert the content of XML file to JSON string:
IMPORTANT NOTE:
Releasing object memory is very important. Even if your object went out of scope, it is not removed from the garbage collection. It happens because the variable still has some value in it. So Garbage collector think that the variable is in use and it doesn't remove it from the memory.
Setting it to NULL, tells the garbage collector that the object is no longer in use and can be removed from the garbage collection.
The below function will convert the content of XML file to JSON string:
private string convertXMLToJSON() { string xmlLogPath = "<<Path to the xml file>>"; // Load the XML file var xDocument = System.Xml.Linq.XDocument.Load(xmlLogPath); // Read the XML file content and write it to string string xml = xDocument.ToString(); // Load the XML string XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); // Convert the XML string to JSON string string jsonText = JsonConvert.SerializeXmlNode(doc); //Release the memory doc = null; xmlLogPath = null; xml = null; xDocument = null; //Return the JSON string return jsonText; }
Releasing object memory is very important. Even if your object went out of scope, it is not removed from the garbage collection. It happens because the variable still has some value in it. So Garbage collector think that the variable is in use and it doesn't remove it from the memory.
Setting it to NULL, tells the garbage collector that the object is no longer in use and can be removed from the garbage collection.
Comments
Post a Comment