Export XML file need the product url

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hello guys,

I m using NopCommerce 2.30 and need help to add the product url on the XML export. I found that the sitemap has the url of the products.  The XML i need to get is like the one bellow.

<mywebstore>
   <created_at>2010-04-08 12:32</created_at>
   <products>
      <product>
          <id>322233</id>
          <name><![CDATA[MadBiker 600]]></name>
         <link><![CDATA[http://www.mywebstore.gr/product/322233]]></link>
          <image><![CDATA[http://www.mywebstore.gr/product/322233.jpg]]></image>
          <category id="23"><![CDATA[Αθλητικά > Extreme Sports]]></category>
           <price_with_vat>322.33</price_with_vat>
          <manufacturer><![CDATA[SuperGlasses]]></manufacturer>
          <description><![CDATA[Πρωτοποριακά γυαλιά με .....]]></description>
          <weight>350</weight>
          <mpn>ZHD332</mpn>
          <instock>N</instock>
          <availability>Κατόπιν Παραγγελίας</availability>
      </product>
      ..........
      ..........
      ..........
   </products>
</mywebstore>

Any suggestions?? I really need to solve this out!
Thanks Mike
12 years ago
look at
...Libraries\Nop.Services\Seo\SitemapGenerator.cs


        private void WriteProducts()
        {
            var products = _productService.GetAllProducts(false);
            foreach (var product in products)
            {
                //TODO add a method for getting URL (use routing because it handles all SEO friendly URLs)
                var url = string.Format("{0}p/{1}/{2}", _webHelper.GetStoreLocation(false), product.Id, product.GetSeName());
                var updateFrequency = UpdateFrequency.Weekly;
                var updateTime = product.UpdatedOnUtc;
                WriteUrlLocation(url, updateFrequency, updateTime);
            }
        }
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.