<?xml version="1.0" encoding=""?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>onestic &#187; Opinión</title>
	<atom:link href="http:///category/blog/opinion/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>blog de onestic</description>
	<lastBuildDate>Thu, 09 Sep 2010 13:02:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Resúmen Barcamp E-commerce. El estado del comercio electrónico en España.</title>
		<link>/el-estado-del-comercio-electronico-en-espana-resumen-barcamp-e-commerce/</link>
		<comments>/el-estado-del-comercio-electronico-en-espana-resumen-barcamp-e-commerce/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 11:43:00 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Opinión]]></category>
		<category><![CDATA[barcamp e-commerce]]></category>
		<category><![CDATA[comercio electrónico]]></category>
		<category><![CDATA[e-commerce]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[tiendas on-line]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=775</guid>
		<description><![CDATA[Ayer estuvimos en Barcelona en las jornadas de la Barcamp E-commerce. Como empresa dedicada al desarrollo de tiendas en Magento en España teniamos que estar presentes para conocer de primera mano cuál es la situación en nuestro país sobre el comercio electrónico.
Algunas &#8220;conclusiones&#8221; hemos sacado de todo lo que se habló, la mayoría positivas. Esperamos [...]]]></description>
			<content:encoded><![CDATA[Ayer estuvimos en Barcelona en las jornadas de la <strong><a href="http://barcamp-ecommerce.es/">Barcamp E-commerce</a></strong>. Como empresa dedicada al <strong>desarrollo de tiendas en Magento en España</strong> teniamos que estar presentes para conocer de primera mano cuál es la situación en nuestro país sobre el <strong>comercio electrónico</strong>.
Algunas &#8220;conclusiones&#8221; hemos sacado de todo lo que se habló, la mayoría positivas. Esperamos que las pequeñas anotaciones mentales que hicimos os sirvan de ayuda si estáis pensando en montar una <strong>tienda de comercio electrónico</strong> con Magento (u otras alternativas) en España.
<ol>
	<li>El mercado Español está &#8220;virgen&#8221;. Llevamos un retraso de 4 años con respecto a países como UK y 2 con respecto a países más cercanos (Francia). Esto significa que todavía <strong>queda mucho negocio</strong>.</li>
	<li>Hay <strong>oportunidades</strong>, y si conseguimos encontrar nuestro nicho de mercado podemos sacar muy buenos rendimientos.</li>
	<li>Los principales problemas que tenemos son tres: <strong>la logística</strong> (que hasta el momento no ha sabido adaptarse a los tiempos que corren), la confianza y los métodos de pago (muchos de ellos intrusivos e incómodos). <strong><a href="http://www.mrw.es/se/MRW_logistica_e_commerce.asp?menu=5">MRW </a></strong>ha lanzado una solución (todavía no sé si muy novedoso) específico para este tipo de negocios.</li>
	<li>Gracias a tiendas como <a href="http://es.vente-privee.com">vente-privee</a> o <a href="http://es.buyvip.com/index.jsp">buy-vip</a> los usuarios están perdiendo el miedo a comprar en internet, cosa que por otra parte nos beneficia a todos. Cuanta más gente compre en internet más oportunidad de negocio tendremos.</li>
	<li>El perfil del comprador está cambiando. Pasamos del típico hombre de mediana edad (25-35 años), &#8220;experto&#8221; en tecnología, a mujeres de cualquier edad que van de compras y buscan ofertas desde la web. Si el ahorro merece la pena, cualquiera está dispuesto a perder 5 minutos delante del ordenador para comprar.</li>
	<li>Los métodos de <strong>captación de tráfico</strong> para tiendas como el <strong>SEO </strong>75%, <strong>SEM </strong>(el que mejor ROI tiene, en teoría), <strong>publicidad </strong>en portales, presencia en <strong>Market places </strong>locales/nacionales,  directorios, <strong>email-marketing </strong>(los datos que ofrecieron dan que pensar), relaciones públicas con otros <strong>Blogs</strong>, <strong>notas de prensa</strong> y la utilización <strong>herramientas 2.0</strong>) son cada vez más efectivas a la hora de sectorizar nuestro público objetivo.</li>
	<li><strong>Analítica web</strong>. Imprescindible. Se estima que los ratios de conversión oscilan, en general, entre el 1% y el 3%. Con estas cifras, las datos proporcionados por herramientas como Analytics deberían bastar. Si conseguimos alcanzar un 3% deberíamos plantearnos la utilización de herramientas que completarán estos datos y nos ofrecerán nuevos puntos de vista.</li>
	<li><strong>Microsegmentación</strong>. Tener claro cuál es nuestro público objetivo y cómo podemos llegar al él de la forma más rápida.</li>
	<li><strong>Fidelización de usuarios</strong>, leads y retorno de la inversión. Planes de marketing, campañas online/offline y la famosa figura del <strong>Community Manager</strong>.</li>
</ol>
En fin, conceptos que todos tenemos claros y pocos aplican (aplicamos&#8230;). Esto no es más que una tormenta de ideas que escuchamos ayer y que &#8211; ciertas o no &#8211; deberían hacernos recapacitar. ¿Estamos haciendo las cosas realmente bien?]]></content:encoded>
			<wfw:commentRss>/el-estado-del-comercio-electronico-en-espana-resumen-barcamp-e-commerce/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixed Product Taxes con Magento. FPT</title>
		<link>/fixed-product-taxes-con-magento-fpt/</link>
		<comments>/fixed-product-taxes-con-magento-fpt/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 07:23:35 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Opinión]]></category>
		<category><![CDATA[fixed product taxes]]></category>
		<category><![CDATA[impuestos]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[tax rates]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=203</guid>
		<description><![CDATA[Hoy vamos a ver cómo se configura la opción de Impuestos fijos por producto, también conocido como Fixed Product Taxes en Magento.

Fixed Product Taxes (FPT) sirve para aplicar impuestos fijos a cada producto. La diferencia con respecto a la otra forma de aplicar impuestos es que de esta manera podemos controlar exactamente qué cantidad vamos [...]]]></description>
			<content:encoded><![CDATA[Hoy vamos a ver cómo se configura la opción de Impuestos fijos por producto, también conocido como Fixed Product Taxes en Magento.

<strong>Fixed Product Taxes (FPT)</strong> sirve para aplicar impuestos fijos a cada producto. La diferencia con respecto a la otra forma de aplicar impuestos es que de esta manera podemos controlar exactamente qué cantidad vamos a aplicar, independientemente de su valor.

<a href="#">Por ejemplo:</a>

En una de las tiendas que hemos creado ultimamente, teníamos el problema de que dos productos con el mismo precio tenía un impuesto diferente. Lo lógico sería crear dos tipos, por ejemplo, uno del 7% y otro del 16% para cada uno de ellos, pero&#8230; qué ocurre cuando estas cantidades no atienden a un % determinado, sino que el cálculo se extrae de una fórmula?

El producto 1, tiene un coste de 10€ y se le aplica un impuesto de 0,96€

El producto 2, tiene un coste de 10€ y se le aplica un impuesto de 2&#8242;4€

El producto 3, tiene un coste de 10€ y se le aplica un impuesto de 3&#8242;7€

&#8230;como veréis, los impuestos no siguen ninguna lógica pero por los motivos que fuera necesitamos aplicar estas cantidades. <a href="http://www.magentocommerce.com">Magento</a> resuelve este problema (la verdad que no es muy común) aplicando los Impuestos fijos por producto.

Pasos para activar esta funcionalidad:

1.- Entramos en el administrador de Magento
2.- Vamos a Sistema -&gt;Configuracion -&gt; Ventas
3.- Seleccionamos &#8220;Impuestos&#8221; y buscamos la opción de Fixed Product Taxes. Normalmente está al final de lista.

<a href="http://onestic.com/wp-content/uploads/2009/10/exp3.jpg"><img src="http://onestic.com/wp-content/uploads/2009/10/exp3.jpg" alt="exp3" title="exp3" width="575" height="365" class="alignnone size-full wp-image-232" /></a>

4.- Enable FPT -&gt; Si

5.- El resto de opciones las dejamos por defecto. Básicamente sirven para mostrar los precios tanto en el catálogo de <a href="http://www.magentocommerce.com">magento </a>como en el detalle de un producto con este impuesto incluido o no.

6.- Ahora creamos un atributo y se lo asignamos a <strong>Fixed product Taxes</strong>. Catalogo -> Atributos -> Gestionar atributos -> Nuevo Atributo

<a href="http://onestic.com/wp-content/uploads/2009/10/exp1.jpg"><img src="http://onestic.com/wp-content/uploads/2009/10/exp1.jpg" alt="exp1" title="exp1" width="575" height="322" class="alignnone size-full wp-image-228" /></a>

Completamos los datos y nos aseguramos de seleccionar la opción de &#8220;<strong>Aplicar a todos los productos</strong>&#8221;

7. Una vez creado el <strong>Atributo </strong>(en mi caso lo he llamado IVA), únicamente nos queda editar un producto y completar los datos.

<a href="http://onestic.com/wp-content/uploads/2009/10/exp2.jpg"><img src="http://onestic.com/wp-content/uploads/2009/10/exp2.jpg" alt="exp2" title="exp2" width="575" height="164" class="alignnone size-full wp-image-230" /></a>

8. En mi caso, he elegido aplicar para este prodcuto un Impuesto de 0,15€]]></content:encoded>
			<wfw:commentRss>/fixed-product-taxes-con-magento-fpt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Multiple Tablerates para Magento</title>
		<link>/multiplerates-magento/</link>
		<comments>/multiplerates-magento/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 10:25:27 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Opinión]]></category>
		<category><![CDATA[extensión]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[métodos de envío]]></category>
		<category><![CDATA[multiplerates]]></category>
		<category><![CDATA[shipping cost]]></category>
		<category><![CDATA[tablerates]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=210</guid>
		<description><![CDATA[Hoy vamos a modificar el módulo de Multiple TableRates de Magento para que haga exactamente lo que necesitamos.
El módulo de Multiple TableRates para Magento como bien sabréis sirve para configurar las tarifas de envío de nuestros pedidos.

1.- Lo primero de todo será instalar el módulo. Si todavía no lo tienes pulsa aquí.
2.- Una vez descargado [...]]]></description>
			<content:encoded><![CDATA[Hoy vamos a modificar el módulo de <a href="http://www.magentocommerce.com/extension/728/multiple-tablerates">Multiple TableRates</a> de <a href="http://www.magentocommerce.com">Magento</a> para que haga exactamente lo que necesitamos.
El módulo de <a href="http://www.magentocommerce.com/extension/728/multiple-tablerates">Multiple TableRates</a> para Magento como bien sabréis sirve para configurar las tarifas de envío de nuestros pedidos.

1.- Lo primero de todo será instalar el módulo. Si todavía no lo tienes pulsa <a href="http://www.magentocommerce.com/extension/728/multiple-tablerates">aquí</a>.
2.- Una vez descargado e instalado dirigete a Sistema -> Configuración -> Método de envío

<a href="http://onestic.com/wp-content/uploads/2009/10/table_rates_1.jpg"><img src="http://onestic.com/wp-content/uploads/2009/10/table_rates_1.jpg" alt="table_rates_1" title="table_rates_1" width="575" height="718" class="alignnone size-full wp-image-290" /></a>

3.- Habilitamos el módulo y lo personalizamos a nuestro gusto. La opción más importante es la "Condición". Vamos a seleccionar "Peso vs. Destino". 
En el cálculo de los costos de envío elegimos "Fijo". La explicación de esto es que para cada zona de envío que creemos, se sumará el peso total y se realizará un cálculo fijo.

4.- Ahora vamos a crear nuestra pequeña tabla con la configuración de los envíos. Cambiamos desde la parte superior izquierda (en el administrador) la vista de tienda (el alcance de la configuración actual). Posiblemente tuvieras seleccionada la "Configuración por defecto". Al cambiar la vista, verás que han aparecido dos nuevos botones. Importar y exportar.

<a href="http://onestic.com/wp-content/uploads/2009/10/table_rates_2.jpg"><img src="http://onestic.com/wp-content/uploads/2009/10/table_rates_2.jpg" alt="table_rates_2" title="table_rates_2" width="575" height="220" class="alignnone size-full wp-image-293" /></a>

5.- Si no hemos subido nada todavía, pulsamos exportar y tendremos un fichero .csv en "blanco" para poder completarlo. Una vez rellenado, lo importaremos.

6.- Para empezar subiremos este. 
El fichero está más o menos claro. Aquellos pedidos que no superen los 140Kg y se envien a cualquier zona (*) de España (ESP), se cobrarán a 48.6 €.

<div class="igBar"><span id="lphp-3"><a href="#" onclick="javascript:showCodeTxt('php-3'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-3">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF0000;">"País"</span>,<span style="color:#FF0000;">"Región/Estado"</span>,<span style="color:#FF0000;">"Código postal"</span>,<span style="color:#FF0000;">"Peso (and above)"</span>,<span style="color:#FF0000;">"Precio de envío"</span>,<span style="color:#FF0000;">"Method Code"</span>,<span style="color:#FF0000;">"Method Name"</span>,<span style="color:#FF0000;">"Method Description"</span>,<span style="color:#FF0000;">"Condition Type"</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ESP,*,*,<span style="color:#CC66CC;color:#800000;">140</span>.<span style="color:#CC66CC;color:#800000;">0000</span>,<span style="color:#CC66CC;color:#800000;">48</span>.<span style="color:#CC66CC;color:#800000;">6000</span>,bajo,Envío a planta baja: Hasta 140Kg,Envio a Bajos,value </div></li></ol></div>
</div></div><br />

7.- Si nos fijamos, en la última palabra de nuestro fichero de configuración pone "value". Esto hace referencia a la condicion que usamos antes "Cálculo de los costos".
Si hubieramos puesto "percent", en vez de calcular el precio "fijo", se calcularia en base a un porcentaje.
Bueno, hasta aquí el funcionamiento "normal" de este módulo. Ahora vamos a modificarlo para que haga lo que nosotros queremos en base a un escenario concreto.

<a href="#">Ejemplo</a>:
Queremos calcular los costes de envio para una tienda. Esta tienda realiza dos tipos de envíos, uno a plantas bajas y otro a naves industriales.
Cada uno de ellos tiene un coste diferente y se rige por unas reglas completamente distintas.

Por una parte, el envío a plantas bajas se calcula mediante la clásica tabla de pesos vs. destino, pero vamos a hacer una modificación. Queremos que una vez superado un peso, el importe no sea "fijo", sino que se multiplique por una constante. Por ejemplo, los pedidos mayores de 200Kg y menores de 500Kg, costarán 0.24€ x Kilo.

Por otra, para los envíos a Naves insdustriales, tendremos que saber primero que tipo de producto estamos enviando y luego los multiplicaremos por lo que cuesta el envío de cada uno de ellos. Por ejemplo, dos cajas de bebida (cada una cuesta 10€ de enviar) y una caja de comida (cada una cuesta 20€ de enviar). El total del envío será 30€.

Ya os adelanto que todo esto no lo hace el módulo de Multiple TableRates, así que tenemos que hacer unos cuantos cambios.
Lo primero, editar el fichero que hace todos los cálculos. Básicamente he cambiado toda la función "collectRates" que es la que hace todos los cálculos.

<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showCodeTxt('php-4'); return false;">PLAIN TEXT</a></span></div><div class="syntax_hilite"><span class="langName">PHP:</span><br /><div id="php-4">
<div class="php"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">.../Multipletablerates/Model/Carrier/Multipletablerates.php</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">public <span style="color:#000000; font-weight:bold;">function</span> collectRates<span style="color:#006600; font-weight:bold;">&#40;</span>Mage_Shipping_Model_Rate_Request <span style="color:#0000FF;">$request</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getConfigFlag</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'active'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#000000; font-weight:bold;">false</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<span style="color:#0000FF;">$request</span>-&gt;<span style="color:#006600;">getConditionName</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$request</span>-&gt;<span style="color:#006600;">setConditionName</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getConfigData</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'condition_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span> ? <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getConfigData</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'condition_name'</span><span style="color:#006600; font-weight:bold;">&#41;</span> : <span style="color:#0000FF;">$this</span>-&gt;_default_condition_name<span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$result</span> = Mage::<span style="color:#006600;">getModel</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'shipping/rate_result'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$rates</span> = <span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getRate</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$request</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">foreach</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rates</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>!<a href="http://www.php.net/empty"><span style="color:#000066;">empty</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#41;</span> &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; <span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'price'</span><span style="color:#006600; font-weight:bold;">&#93;</span> &amp;amp;amp;amp;gt;= <span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span> </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span> = Mage::<span style="color:#006600;">getModel</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'shipping/rate_result_method'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setCarrier</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'multipletablerates'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setCarrierTitle</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getConfigData</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'title'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setMethod</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'bestway_'</span> . <span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'pk'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setMethodTitle</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'method_name'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#0000FF;">$price</span> = <span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'price'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Onestic Si el peso es mayor o igual a 200 multiplicamos el peso total por el coeficiente*/</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'condition_value'</span><span style="color:#006600; font-weight:bold;">&#93;</span> &amp;amp;amp;amp;gt;=<span style="color:#CC66CC;color:#800000;">200</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; <span style="color:#008000;">/*Aquí podemos poner el valor que queramos*/</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$mageFilename</span> = <span style="color:#FF0000;">'app/Mage.php'</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">require_once</span> <span style="color:#0000FF;">$mageFilename</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/umask"><span style="color:#000066;">umask</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mage::<span style="color:#006600;">app</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mage::<span style="color:#006600;">getSingleton</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'core/session'</span>, <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'name'</span>=&amp;amp;amp;amp;gt;<span style="color:#FF0000;">'frontend'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$session</span> = Mage::<span style="color:#006600;">getSingleton</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'checkout/session'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$aux_weight</span>= <span style="color:#CC66CC;color:#800000;">0</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Sumamos el peso de todos los productos del carrito y lo multiplicamos por el coeficiente */</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$session</span>-&gt;<span style="color:#006600;">getQuote</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getAllItems</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$prod</span> = <span style="color:#000000; font-weight:bold;">new</span> Mage_Catalog_Model_Product<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$prod</span>= <span style="color:#0000FF;">$prod</span>-&gt;<span style="color:#006600;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$item</span>-&gt;<span style="color:#006600;">getProduct</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getId</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color:#0000FF;">$aux_weight</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$item</span>-&gt;<span style="color:#006600;">getQty</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> * <span style="color:#0000FF;">$prod</span>-&gt;<span style="color:#006600;">getWeight</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> + <span style="color:#0000FF;">$aux_weight</span>;&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$price</span> = <span style="color:#0000FF;">$aux_weight</span> * <span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'price'</span><span style="color:#006600; font-weight:bold;">&#93;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Esto lo dejamos igual. El cálculo en porcentaje es correcto */</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'condition_type'</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#FF0000;">'percent'</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$price</span> = <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$price</span> * <span style="color:#0000FF;">$request</span>-&gt;<span style="color:#006600;">getData</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$request</span>-&gt;<span style="color:#006600;">getConditionName</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> / <span style="color:#CC66CC;color:#800000;">100</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/*Onestic*/</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Calculamos el precio del envío, para eso cogemos el número de productos que hay en el carro, sacamos su tipo, y lo</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; multiplicamos por el coste unidad. Esto solo ocurre cuando la entrega es en un Piso, dnd el cálculo del envío se hace</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#008000;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; por producto y no por peso. condition_type = product. En nuestro fichero .csv ahora podemos poner condition_type además de percent ó value el tipo product*/</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'condition_type'</span><span style="color:#006600; font-weight:bold;">&#93;</span> == <span style="color:#FF0000;">'product'</span><span style="color:#006600; font-weight:bold;">&#41;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$mageFilename</span> = <span style="color:#FF0000;">'app/Mage.php'</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">require_once</span> <span style="color:#0000FF;">$mageFilename</span>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/umask"><span style="color:#000066;">umask</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC66CC;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mage::<span style="color:#006600;">app</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Mage::<span style="color:#006600;">getSingleton</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'core/session'</span>, <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'name'</span>=&amp;amp;amp;amp;gt;<span style="color:#FF0000;">'frontend'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$session</span> = Mage::<span style="color:#006600;">getSingleton</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'checkout/session'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$aux_price</span> = <span style="color:#CC66CC;color:#800000;">0</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$session</span>-&gt;<span style="color:#006600;">getQuote</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getAllItems</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$item</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$prod</span> = <span style="color:#000000; font-weight:bold;">new</span> Mage_Catalog_Model_Product<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$prod</span>= <span style="color:#0000FF;">$prod</span>-&gt;<span style="color:#006600;">load</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$item</span>-&gt;<span style="color:#006600;">getProduct</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>-&gt;<span style="color:#006600;">getId</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Previo a este paso, hemos creado un atributo desde el configurador de atributos, llamado 'tipo_producto'. Es un dropdown con dos valores (bebida y comida), para poder determinar que clase de producto es */</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color:#616100;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$prod</span>-&gt;<span style="color:#006600;">getAttributeText</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'tipo_producto'</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#FF0000;">'bebida'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <span style="color:#0000FF;">$aux_price</span> = <span style="color:#0000FF;">$aux_price</span> + <span style="color:#0000FF;">$item</span>-&gt;<span style="color:#006600;">getQty</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> * <span style="color:#CC66CC;color:#800000;">10</span>;&nbsp; <span style="color:#008000;">/*Multiplicamos por 10 */</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#616100;">elseif</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$prod</span>-&gt;<span style="color:#006600;">getAttributeText</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'tipo_producto'</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#FF0000;">'comida'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#123;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; <span style="color:#0000FF;">$aux_price</span> = <span style="color:#0000FF;">$aux_price</span> + <span style="color:#0000FF;">$item</span>-&gt;<span style="color:#006600;">getQty</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> * <span style="color:#CC66CC;color:#800000;">20</span>;&nbsp; <span style="color:#008000;">/*Multiplicamos por 20 */</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;<span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$price</span> = <span style="color:#0000FF;">$aux_price</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#008000;">/* Fin Onestic */</span></div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setPrice</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$this</span>-&gt;<span style="color:#006600;">getFinalPriceWithHandlingFee</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$price</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$method</span>-&gt;<span style="color:#006600;">setCost</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$rate</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#FF0000;">'cost'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$result</span>-&gt;<span style="color:#006600;">append</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$method</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div></li>
<li style="font-weight: bold;color:IG_LINE_COLOUR_2;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">return</span> <span style="color:#0000FF;">$result</span>;</div></li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:IG_LINE_COLOUR_1;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div></li></ol></div>
</div></div><br />

Bueno, y con esto ya está todo. Ahora el Multiple Tablerates hace exactamente lo que queremos. Quizás no sea el modo más "limpio", pero desde luego hace lo que necesitamos.
]]></content:encoded>
			<wfw:commentRss>/multiplerates-magento/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configuracion de Paypal Express con Magento</title>
		<link>/configuracion-de-paypal-express-con-magento/</link>
		<comments>/configuracion-de-paypal-express-con-magento/#comments</comments>
		<pubDate>Fri, 01 May 2009 10:50:37 +0000</pubDate>
		<dc:creator>Sergio Baixauli</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[Opinión]]></category>
		<category><![CDATA[magento]]></category>
		<category><![CDATA[paypal]]></category>

		<guid isPermaLink="false">http://onestic.com/?p=214</guid>
		<description><![CDATA[Para configurar el módulo de pago de Paypal con Magento tendremos que realizar los siguientes los pasos:]]></description>
			<content:encoded><![CDATA[Para configurar el módulo de pago de Paypal con Magento tendremos que realizar los siguientes los pasos:]]></content:encoded>
			<wfw:commentRss>/configuracion-de-paypal-express-con-magento/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
