Plugin Directory

Changeset 2747169


Ignore:
Timestamp:
06/23/2022 03:47:41 PM (4 years ago)
Author:
senciya
Message:

Mejoras fichero json

Location:
redlaxia/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • redlaxia/trunk/includes/feed_woocommerce.php

    r2741780 r2747169  
    3636
    3737function redla_feed_productos($data) {
    38 
     38   
     39    $noimg = REDLA_URL.'images/no-img.png';
     40   
    3941    $args = array(
    4042        'limit' => -1,
     
    5860        $type = $product->get_type();
    5961        $name = $product->get_name();
    60         $img_url = get_the_post_thumbnail_url($id, 'thumbnail');
     62        $img_check = get_the_post_thumbnail_url($id, 'thumbnail');
     63        if(!$img_check){
     64            $img_url = $noimg;
     65        }else{
     66            $img_url = $img_check;
     67        }
    6168        $terms = get_the_terms($id, 'product_cat');
    6269        $oferta = 'n';
     
    97104        }
    98105        $cat = implode(', ', $cat);
    99 
    100         $json[] = array(
    101             'num' => $x,
    102             'type' => $type,
    103             'id' => $id,
    104             'name' => $name,
    105             'price' => strip_tags($precio),
    106             'price_antes' => strip_tags($precio_antes),
    107             'oferta' => $oferta,
    108             'img' => $img_url,
    109             'cat' => $cat
    110         );
     106       
     107        $stock = $product->get_stock_quantity();
     108        $stock_status = $product->get_stock_status();
     109       
     110        if($stock_status == "instock"){
     111            $json[] = array(
     112                'num' => $x,
     113                'type' => $type,
     114                'id' => $id,
     115                'name' => $name,
     116                'price' => strip_tags($precio),
     117                'price_antes' => strip_tags($precio_antes),
     118                'oferta' => $oferta,
     119                'img' => $img_url,
     120                'cat' => $cat,
     121                'stock' => $stock,
     122                'stock_status' => $stock_status
     123            );
     124        }
    111125    }
    112126
  • redlaxia/trunk/pages/conectar_tienda.php

    r2742187 r2747169  
    3838
    3939$tag = 'error';
    40 $msj = 'Parece que tu tienda no esta conectada... Rellena el formulario y pulsa en "Conectar mi tienda".';
     40$msj = '1Parece que tu tienda no esta conectada... Rellena el formulario y pulsa en "Conectar mi tienda".';
    4141$respuesta = false;
    4242
     
    154154 * Realizamos consulta a la web principal para ver si todo esta OK, enviamos el token y esperamos OK o ERROR.
    155155 */
     156
    156157if ($token and !$respuesta) {
    157158    $response = wp_remote_post(REDLA_URL_APP, array(
  • redlaxia/trunk/readme.txt

    r2742187 r2747169  
    55Tested up to: 6.0
    66Requires PHP: 5.6.20
    7 Stable tag: 1.0.1
     7Stable tag: 1.0.2
    88License: GPL-2.0+
    99License URI: http://www.gnu.org/licenses/gpl-2.0.txt
     
    1313== Description ==
    1414Plugin y app gratuitos, sin comisiones ni cuotas!!
     15
    1516Los usuarios de nuestra app Redlaxia podrán acceder a tu tienda online desde la app, listado de productos, añadir productos al carrito y realizar el pedido. El pedido se realizará directamente en tu tienda Woocommerce, solo tu tendrás acceso a los datos de tu cliente, así como al pedido que ha realizado.
    1617
  • redlaxia/trunk/redlaxia.php

    r2742187 r2747169  
    1111 * Plugin URI:        https://redlaxia.com/wordpress
    1212 * Description:       Promociona tu tienda y productos en nuestra app de tiendas online.
    13  * Version:           1.0.1
     13 * Version:           1.0.2
    1414 * Author:            Redlaxia
    1515 * Author URI:        https://redlaxia.com
Note: See TracChangeset for help on using the changeset viewer.