{"id":12044,"date":"2026-06-09T16:55:35","date_gmt":"2026-06-09T21:55:35","guid":{"rendered":"https:\/\/discnet.com.pe\/?page_id=12044"},"modified":"2026-06-10T10:22:07","modified_gmt":"2026-06-10T15:22:07","slug":"bienvenido-a-discnet","status":"publish","type":"page","link":"https:\/\/discnet.com.pe\/en\/","title":{"rendered":"Bienvenido a Discnet"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"12044\" class=\"elementor elementor-12044\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-020e731 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"020e731\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3a53bcb\" data-id=\"3a53bcb\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0d7d6e0 elementor-widget elementor-widget-html\" data-id=\"0d7d6e0\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<script>\r\njQuery(function($){\r\n\r\n  let page = 1;\r\n  let loading = false;\r\n  let finished = false;\r\n  const perPage = 30;\r\n\r\n  $('#discnet-catalogo-infinito').remove();\r\n  $('#discnet-catalogo-css').remove();\r\n\r\n  $('body').addClass('discnet-solo-productos');\r\n\r\n  const html = `\r\n    <section id=\"discnet-catalogo-infinito\">\r\n\r\n      <div class=\"discnet-catalogo-head\">\r\n        <div>\r\n          <h2>Cat\u00e1logo de productos<\/h2>\r\n          <p>Explora nuestros productos disponibles<\/p>\r\n        <\/div>\r\n        <span>Carga infinita activa<\/span>\r\n      <\/div>\r\n\r\n      <div id=\"discnet-products-grid\"><\/div>\r\n\r\n      <button id=\"discnet-load-btn\">\r\n        \ud83d\ude80 CARGANDO M\u00c1S PRODUCTOS...\r\n      <\/button>\r\n\r\n    <\/section>\r\n  `;\r\n\r\n  const header = $('.site-header').last();\r\n\r\n  if(header.length){\r\n    header.after(html);\r\n  }else{\r\n    $('body').prepend(html);\r\n  }\r\n\r\n  $('head').append(`\r\n    <style id=\"discnet-catalogo-css\">\r\n\r\n      body.discnet-solo-productos .elementor,\r\n      body.discnet-solo-productos .site-footer,\r\n      body.discnet-solo-productos footer,\r\n      body.discnet-solo-productos .footer-row,\r\n      body.discnet-solo-productos .footer-widgets{\r\n        display:none!important;\r\n      }\r\n\r\n      #discnet-catalogo-infinito{\r\n        width:99.8%!important;\r\n        max-width:none!important;\r\n        margin:4px auto 40px!important;\r\n        padding:0 5px!important;\r\n        background:#fff!important;\r\n        box-sizing:border-box!important;\r\n        position:relative!important;\r\n        z-index:9999!important;\r\n      }\r\n\r\n      .discnet-catalogo-head{\r\n        display:flex!important;\r\n        justify-content:space-between!important;\r\n        align-items:center!important;\r\n        padding:7px 12px!important;\r\n        margin:0 0 7px!important;\r\n        border:1px solid #e5eaf1!important;\r\n        border-radius:8px!important;\r\n        background:#f8fafc!important;\r\n      }\r\n\r\n      .discnet-catalogo-head h2{\r\n        font-size:16px!important;\r\n        line-height:19px!important;\r\n        margin:0!important;\r\n        color:#0f172a!important;\r\n        font-weight:900!important;\r\n      }\r\n\r\n      .discnet-catalogo-head p{\r\n        font-size:10px!important;\r\n        line-height:12px!important;\r\n        margin:1px 0 0!important;\r\n        color:#64748b!important;\r\n      }\r\n\r\n      .discnet-catalogo-head span{\r\n        background:#004aad!important;\r\n        color:#fff!important;\r\n        padding:5px 9px!important;\r\n        border-radius:20px!important;\r\n        font-size:10px!important;\r\n        font-weight:900!important;\r\n        white-space:nowrap!important;\r\n      }\r\n\r\n      #discnet-products-grid{\r\n        display:grid!important;\r\n        grid-template-columns:repeat(6,minmax(0,1fr))!important;\r\n        gap:8px!important;\r\n        width:100%!important;\r\n      }\r\n\r\n      .discnet-card{\r\n        background:#fff!important;\r\n        border:1px solid #dfe6ee!important;\r\n        border-radius:9px!important;\r\n        overflow:hidden!important;\r\n        box-shadow:0 2px 8px rgba(0,0,0,.07)!important;\r\n        min-height:350px!important;\r\n        height:auto!important;\r\n        display:flex!important;\r\n        flex-direction:column!important;\r\n        transition:.18s ease!important;\r\n      }\r\n\r\n      .discnet-card:hover{\r\n        transform:translateY(-2px)!important;\r\n        box-shadow:0 8px 18px rgba(0,0,0,.13)!important;\r\n      }\r\n\r\n      .discnet-img-box2{\r\n        height:210px!important;\r\n        min-height:210px!important;\r\n        max-height:210px!important;\r\n        padding:2px!important;\r\n        background:#fff!important;\r\n        display:flex!important;\r\n        align-items:center!important;\r\n        justify-content:center!important;\r\n        overflow:hidden!important;\r\n        border-bottom:1px solid #edf1f5!important;\r\n      }\r\n\r\n      .discnet-img-box2 img{\r\n        width:100%!important;\r\n        height:100%!important;\r\n        max-width:100%!important;\r\n        max-height:100%!important;\r\n        object-fit:contain!important;\r\n        display:block!important;\r\n        margin:0!important;\r\n        padding:0!important;\r\n        transform:scale(1.16)!important;\r\n        transform-origin:center center!important;\r\n      }\r\n\r\n      .discnet-card:hover .discnet-img-box2 img{\r\n        transform:scale(1.22)!important;\r\n      }\r\n\r\n      .discnet-info{\r\n        padding:6px 7px 8px!important;\r\n        display:flex!important;\r\n        flex-direction:column!important;\r\n        flex:1!important;\r\n      }\r\n\r\n      .discnet-title{\r\n        font-size:9.7px!important;\r\n        line-height:12px!important;\r\n        height:36px!important;\r\n        overflow:hidden!important;\r\n        margin:0 0 5px!important;\r\n        color:#111827!important;\r\n        font-weight:900!important;\r\n        text-transform:uppercase!important;\r\n      }\r\n\r\n      .discnet-title a{\r\n        color:#111827!important;\r\n        text-decoration:none!important;\r\n      }\r\n\r\n      .discnet-price{\r\n        min-height:25px!important;\r\n        margin-bottom:4px!important;\r\n      }\r\n\r\n      .discnet-price,\r\n      .discnet-price span,\r\n      .discnet-price bdi{\r\n        font-size:18px!important;\r\n        line-height:20px!important;\r\n        color:#000!important;\r\n        font-weight:950!important;\r\n      }\r\n\r\n      .discnet-price del,\r\n      .discnet-price del span,\r\n      .discnet-price del bdi{\r\n        color:#777!important;\r\n        font-size:9px!important;\r\n        line-height:10px!important;\r\n        font-weight:700!important;\r\n      }\r\n\r\n      .discnet-price ins{\r\n        text-decoration:none!important;\r\n      }\r\n\r\n      .discnet-stock{\r\n        width:max-content!important;\r\n        max-width:100%!important;\r\n        display:inline-flex!important;\r\n        align-items:center!important;\r\n        background:#ff4046!important;\r\n        color:#fff!important;\r\n        padding:3px 7px!important;\r\n        border-radius:12px!important;\r\n        font-size:8.8px!important;\r\n        line-height:10px!important;\r\n        font-weight:900!important;\r\n        margin:0 0 6px!important;\r\n      }\r\n\r\n      .discnet-stock.out{\r\n        background:#eef4ff!important;\r\n        color:#004aad!important;\r\n      }\r\n\r\n      .discnet-actions{\r\n        margin-top:auto!important;\r\n        display:grid!important;\r\n        grid-template-columns:1fr 31px!important;\r\n        gap:5px!important;\r\n      }\r\n\r\n      .discnet-buy{\r\n        background:#004aad!important;\r\n        color:#fff!important;\r\n        border-radius:7px!important;\r\n        padding:7px 4px!important;\r\n        text-align:center!important;\r\n        text-decoration:none!important;\r\n        font-size:9.8px!important;\r\n        line-height:11px!important;\r\n        font-weight:900!important;\r\n        display:block!important;\r\n      }\r\n\r\n      .discnet-cart{\r\n        width:31px!important;\r\n        height:27px!important;\r\n        background:#f3f6fa!important;\r\n        color:#1f2937!important;\r\n        border:1px solid #dce4ee!important;\r\n        border-radius:7px!important;\r\n        display:flex!important;\r\n        align-items:center!important;\r\n        justify-content:center!important;\r\n        font-size:13px!important;\r\n        text-decoration:none!important;\r\n      }\r\n\r\n      .discnet-buy:hover{\r\n        background:#003b8e!important;\r\n      }\r\n\r\n      .discnet-cart:hover{\r\n        background:#ed1111!important;\r\n        color:#fff!important;\r\n      }\r\n\r\n      #discnet-load-btn{\r\n        display:block!important;\r\n        margin:15px auto 8px!important;\r\n        padding:11px 24px!important;\r\n        border:0!important;\r\n        border-radius:35px!important;\r\n        background:linear-gradient(90deg,#004aad,#ed1111)!important;\r\n        color:#fff!important;\r\n        font-size:12px!important;\r\n        font-weight:900!important;\r\n        cursor:pointer!important;\r\n        box-shadow:0 8px 20px rgba(0,0,0,.18)!important;\r\n      }\r\n\r\n      .discnet-loading-card{\r\n        min-height:350px!important;\r\n        border-radius:9px!important;\r\n        border:1px solid #e5eaf1!important;\r\n        background:linear-gradient(90deg,#f3f4f6,#fff,#f3f4f6)!important;\r\n        background-size:200% 100%!important;\r\n        animation:discnetSkeleton 1s linear infinite!important;\r\n      }\r\n\r\n      @keyframes discnetSkeleton{\r\n        0%{background-position:200% 0}\r\n        100%{background-position:-200% 0}\r\n      }\r\n\r\n      @media(max-width:1300px){\r\n        #discnet-products-grid{\r\n          grid-template-columns:repeat(5,minmax(0,1fr))!important;\r\n        }\r\n\r\n        .discnet-img-box2{\r\n          height:205px!important;\r\n          min-height:205px!important;\r\n          max-height:205px!important;\r\n        }\r\n      }\r\n\r\n      @media(max-width:1000px){\r\n        #discnet-products-grid{\r\n          grid-template-columns:repeat(4,minmax(0,1fr))!important;\r\n        }\r\n\r\n        .discnet-img-box2{\r\n          height:190px!important;\r\n          min-height:190px!important;\r\n          max-height:190px!important;\r\n        }\r\n      }\r\n\r\n      @media(max-width:700px){\r\n        #discnet-products-grid{\r\n          grid-template-columns:repeat(2,minmax(0,1fr))!important;\r\n          gap:7px!important;\r\n        }\r\n\r\n        .discnet-card{\r\n          min-height:305px!important;\r\n        }\r\n\r\n        .discnet-img-box2{\r\n          height:175px!important;\r\n          min-height:175px!important;\r\n          max-height:175px!important;\r\n        }\r\n\r\n        .discnet-title{\r\n          font-size:9.2px!important;\r\n          line-height:11.5px!important;\r\n          height:34px!important;\r\n        }\r\n\r\n        .discnet-price,\r\n        .discnet-price span,\r\n        .discnet-price bdi{\r\n          font-size:15px!important;\r\n          line-height:18px!important;\r\n        }\r\n\r\n        .discnet-catalogo-head{\r\n          align-items:flex-start!important;\r\n          flex-direction:column!important;\r\n        }\r\n      }\r\n\r\n    <\/style>\r\n  `);\r\n\r\n  function safeText(text){\r\n    return String(text || '')\r\n      .replace(\/<\/g,'&lt;')\r\n      .replace(\/>\/g,'&gt;');\r\n  }\r\n\r\n  function renderSkeleton(){\r\n    let html = '';\r\n    for(let i = 0; i < 6; i++){\r\n      html += `<div class=\"discnet-loading-card\"><\/div>`;\r\n    }\r\n    $('#discnet-products-grid').append(html);\r\n  }\r\n\r\n  function removeSkeleton(){\r\n    $('.discnet-loading-card').remove();\r\n  }\r\n\r\n  async function loadProducts(){\r\n    if(loading || finished) return;\r\n\r\n    loading = true;\r\n    $('#discnet-load-btn').text('\u23f3 CARGANDO M\u00c1S PRODUCTOS...');\r\n    renderSkeleton();\r\n\r\n    try{\r\n      const res = await fetch('\/wp-json\/wc\/store\/v1\/products?per_page=' + perPage + '&page=' + page + '&orderby=date&order=desc', {\r\n        credentials:'same-origin'\r\n      });\r\n\r\n      const products = await res.json();\r\n      removeSkeleton();\r\n\r\n      if(!Array.isArray(products) || products.length === 0){\r\n        finished = true;\r\n        $('#discnet-load-btn').text('\u2705 HAS LLEGADO AL FINAL DEL CAT\u00c1LOGO');\r\n        return;\r\n      }\r\n\r\n      products.forEach(function(p){\r\n\r\n        const img = p.images && p.images[0] ? p.images[0].src : '';\r\n        const link = p.permalink || '#';\r\n        const name = safeText(p.name);\r\n        const price = p.price_html || '';\r\n        const id = p.id || '';\r\n\r\n        const stock = p.is_in_stock\r\n          ? `<span class=\"discnet-stock\">\ud83d\udce6 Disponible<\/span>`\r\n          : `<span class=\"discnet-stock out\">Sin existencias<\/span>`;\r\n\r\n        $('#discnet-products-grid').append(`\r\n          <div class=\"discnet-card\">\r\n\r\n            <a class=\"discnet-img-box2\" href=\"${link}\">\r\n              <img decoding=\"async\" src=\"${img}\" alt=\"${name}\" loading=\"lazy\">\r\n            <\/a>\r\n\r\n            <div class=\"discnet-info\">\r\n\r\n              <h3 class=\"discnet-title\">\r\n                <a href=\"${link}\">${name}<\/a>\r\n              <\/h3>\r\n\r\n              <div class=\"discnet-price\">\r\n                ${price}\r\n              <\/div>\r\n\r\n              ${stock}\r\n\r\n              <div class=\"discnet-actions\">\r\n                <a class=\"discnet-buy\" href=\"${link}\">\r\n                  Ver producto\r\n                <\/a>\r\n\r\n                <a class=\"discnet-cart\" href=\"\/?add-to-cart=${id}\" title=\"Agregar al carrito\">\r\n                  \ud83d\uded2\r\n                <\/a>\r\n              <\/div>\r\n\r\n            <\/div>\r\n\r\n          <\/div>\r\n        `);\r\n\r\n      });\r\n\r\n      page++;\r\n      $('#discnet-load-btn').text('\ud83d\ude80 CARGANDO M\u00c1S PRODUCTOS...');\r\n\r\n    }catch(e){\r\n      removeSkeleton();\r\n      console.log(e);\r\n      $('#discnet-load-btn').text('\u26a0\ufe0f ERROR AL CARGAR PRODUCTOS');\r\n    }\r\n\r\n    loading = false;\r\n  }\r\n\r\n  $('#discnet-load-btn').on('click', loadProducts);\r\n\r\n  loadProducts();\r\n\r\n  $(window).on('scroll', function(){\r\n    if(loading || finished) return;\r\n\r\n    const btn = $('#discnet-load-btn');\r\n    if(!btn.length) return;\r\n\r\n    const btnTop = btn.offset().top;\r\n    const scrollBottom = $(window).scrollTop() + $(window).height();\r\n\r\n    if(scrollBottom > btnTop - 700){\r\n      loadProducts();\r\n    }\r\n  });\r\n\r\n});\r\n<\/script>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-12044","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/pages\/12044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/comments?post=12044"}],"version-history":[{"count":8,"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/pages\/12044\/revisions"}],"predecessor-version":[{"id":12099,"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/pages\/12044\/revisions\/12099"}],"wp:attachment":[{"href":"https:\/\/discnet.com.pe\/en\/wp-json\/wp\/v2\/media?parent=12044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}