Jump to content

Problema Con El Carrito De La Compra


genis

Recommended Posts

Hola, he instalado un nuevo tema en prestashop 1.4.2.5, y resulta que cuando estoy en el proceso de compra : order.php?step=1, y pulso la pestaña siguiente, entonces me pasa a la pagina:order.php y se queda bloqueada sin ninguna opción posible.

 

post-396519-0-81791500-1362070919_thumb.jpgpost-396519-0-04948800-1362070928_thumb.jpg

 

Mi tienda es fruitesvilaplana.com

 

 

Grácias

Edited by genis (see edit history)
Link to comment
Share on other sites

Hola, he instalado un nuevo tema en prestashop 1.4.2.5, y resulta que cuando estoy en el proceso de compra : order.php?step=1, y pulso la pestaña siguiente, entonces me pasa a la pagina:order.php y se queda bloqueada sin ninguna opción posible.

 

post-396519-0-81791500-1362070919_thumb.jpgpost-396519-0-04948800-1362070928_thumb.jpg

 

Mi tienda es fruitesvilaplana.com

 

 

Grácias

 

Cambia en el fichero:

 

/config/config.inc.php

 

el display_errors de off a on, y dime se te sale algun error mas descriptivo.

 

PD: Ahora mismo no puedo entrar a tu tienda.

Link to comment
Share on other sites

El problema me lo cusa un módulo llamado megasshiping, que en la carpeta override me instala 2 archivos: 1 llamado carrier.php y otro llamado cart.php.

 

carrier.php:

<?php

 

//require_once(_PS_MODULE_DIR_ . "megashipping/megashipping.class.php");

 

class Carrier extends CarrierCore

{

public static function onlyMegaShippingCarrier()

{

global $cart;

 

$products = $cart->getProducts();

 

$Ids = Configuration::get('MEGA_SHIPPING_ATTR_SERVICES');

$arrayIds = explode(",",$Ids);

if(isset($arrayIds) && sizeof($arrayIds)>0)

{

foreach($products as $product)

{

if(isset($product['id_product_attribute']) && $product['id_product_attribute']!=0)

{

$attributes = Db::getInstance()->ExecuteS('SELECT `id_attribute` FROM `'._DB_PREFIX_.'product_attribute_combination` WHERE `id_product_attribute` = '.(int)($product['id_product_attribute']));

if(isset($attributes) && $attributes)

{

foreach($attributes as $attr)

{

if(in_array($attr['id_attribute'],$arrayIds))

return true;

}

}

}

 

}

}

return false;

}

 

public static function getCarriersForOrder($id_zone, $groups = null)

{

global $cookie, $cart;

 

if (is_array($groups) && !empty($groups))

$result = Carrier::getCarriers((int)$cookie->id_lang, true, false, (int)$id_zone, $groups, self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);

else

$result = Carrier::getCarriers((int)$cookie->id_lang, true, false, (int)$id_zone, array(1), self::PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);

$resultsArray = array();

$onlyMegaShipping = Carrier::onlyMegaShippingCarrier();

$disable_carrier = (int)Configuration::get('MEGA_SHIPPING_DISABLE_CARRIER');

$id_ms_carrier = (int)(Configuration::get('MEGA_SHIPPING_CARRIER_ID'));

foreach ($result as $k => $row)

{

if($id_ms_carrier==(int)$row['id_carrier'] AND isset($cart->id_address_delivery) AND $cart->id_address_delivery)

{

$address = new Address((int)$cart->id_address_delivery);

$cp = $address->postcode;

$ms = MegaShippingCP::getMegaShippingCP($cp);

if(!isset($ms))

{

unset($result[$k]);

continue;

}

 

}

 

if ($onlyMegaShipping && $id_ms_carrier!=(int)$row['id_carrier'])

{

unset($result[$k]);

continue;

}

$carrier = new Carrier((int)$row['id_carrier']);

$shippingMethod = $carrier->getShippingMethod();

if ($shippingMethod != Carrier::SHIPPING_METHOD_FREE)

{

// Get only carriers that are compliant with shipping method

if (($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && $carrier->getMaxDeliveryPriceByWeight($id_zone) === false)

|| ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE && $carrier->getMaxDeliveryPriceByPrice($id_zone) === false))

{

unset($result[$k]);

continue;

}

/* // Get only carriers that are compliant with shipping method

if ($cart->isMailCart() && $row['id_carrier']!=3)

{

unset($result[$k]);

continue;

}*/

 

// If out-of-range behavior carrier is set on "Desactivate carrier"

if ($row['range_behavior'])

{

// Get id zone

if (!$id_zone)

$id_zone = Country::getIdZone(Country::getDefaultCountryId());

 

// Get only carriers that have a range compatible with cart

if (($shippingMethod == Carrier::SHIPPING_METHOD_WEIGHT && (!Carrier::checkDeliveryPriceByWeight($row['id_carrier'], $cart->getTotalWeight(), $id_zone)))

|| ($shippingMethod == Carrier::SHIPPING_METHOD_PRICE

&& (!Carrier::checkDeliveryPriceByPrice($row['id_carrier'], $cart->getOrderTotal(true, Cart::BOTH_WITHOUT_SHIPPING), $id_zone, $cart->id_currency))))

{

unset($result[$k]);

continue;

}

}

}

 

$row['name'] = (strval($row['name']) != '0' ? $row['name'] : Configuration::get('PS_SHOP_NAME'));

$row['price'] = ($shippingMethod == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getOrderShippingCost((int)$row['id_carrier']));

$row['price_tax_exc'] = ($shippingMethod == Carrier::SHIPPING_METHOD_FREE ? 0 : $cart->getOrderShippingCost((int)$row['id_carrier'], false));

$row['img'] = file_exists(_PS_SHIP_IMG_DIR_.(int)($row['id_carrier']).'.jpg') ? _THEME_SHIP_DIR_.(int)($row['id_carrier']).'.jpg' : '';

 

// If price is false, then the carrier is unavailable (carrier module)

if ($row['price'] === false)

{

unset($result[$k]);

continue;

}

 

$resultsArray[] = $row;

}

return $resultsArray;

}

 

}

?>

 

Grácias por la ayuda

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...