gudule1er Posted April 11, 2014 Share Posted April 11, 2014 hi, I would like to change the layout of the module estimate shipping in the resume cart page (carriercompare) yet the module displays three columns carrier | Information | Price I would like to come together two columns like this: carrier & information [prices anyone know what tpl file must be changed? thanks Link to comment Share on other sites More sharing options...
tmk Posted April 11, 2014 Share Posted April 11, 2014 Generally cells with carrier | Information | Price are generated in carriercompare.tpl located in module/carriercompare/template Link to comment Share on other sites More sharing options...
gudule1er Posted April 11, 2014 Author Share Posted April 11, 2014 yes i look this but i don't show construct table in this file...!! Link to comment Share on other sites More sharing options...
tmk Posted April 11, 2014 Share Posted April 11, 2014 Here it is if this is what you are searching for. <div id="availableCarriers"> <table cellspacing="0" cellpadding="0" id="availableCarriers_table" class="std"> <thead> <tr> <th class="carrier_action first_item"></th> <th class="carrier_name item">{l s='Carrier' mod='carriercompare'}</th> <th class="carrier_infos item">{l s='Information' mod='carriercompare'}</th> <th class="carrier_price last_item">{l s='Price' mod='carriercompare'}</th> </tr> </thead> <tbody id="carriers_list"> </tbody> </table> </div> Link to comment Share on other sites More sharing options...
gudule1er Posted April 12, 2014 Author Share Posted April 12, 2014 yes i look this but where is the hook ?? Link to comment Share on other sites More sharing options...
gudule1er Posted April 15, 2014 Author Share Posted April 15, 2014 I get this code in the carriercompare.js var query = $.ajax({ type: 'POST', headers: { "cache-control": "no-cache" }, url: baseDir + 'modules/carriercompare/ajax.php' + '?rand=' + new Date().getTime(), data: 'method=getCarriers&id_country=' + $('#id_country').val() + '&id_state=' + $('#id_state').val() + '&zipcode=' + $('#zipcode').val(), dataType: 'json', success: function(json) { if (json.length) { var html = ''; $.each(json, function(index, carrier) { html += '<tr class="'+(index % 2 ? 'alternate_' : '')+'item">'+ '<td class="" width="64px">'+ ' <input type="radio" name="carrier_price_value" value="'+ ((displayPrice == 1) ? carrier.price_tax_exc : carrier.price) +'" id="id_carrier'+carrier.id_carrier+'" '+(id_carrier == carrier.id_carrier ? 'checked="checked"' : '')+'/>'+ '</td>'+ '<td class="carrier_name">'+ '<label for="id_carrier'+carrier.id_carrier+'">'+ (carrier.img ? '<img src="'+carrier.img+'" alt="'+carrier.name+'" />' : carrier.name)+ '</label>'+ '</td>'+ '<td class="carrier_infos">'+ ((carrier.delay != null) ? carrier.delay : '') + '</td>'+ '<td class="carrier_price">'; if (carrier.price) { html += '<span class="price">'+(displayPrice == 1 ? formatCurrency(carrier.price_tax_exc, currencyFormat, currencySign, currencyBlank) : formatCurrency(carrier.price, currencyFormat, currencySign, currencyBlank))+'</span>'; } else { html += txtFree; } html += '</td>'+ '</tr>'; }); $('#carriers_list').append(html); I think the table construction for carrier compare in the resume cart page is here but when i remvove balise <td> at the line of information of carreir not wot in front office have you an idea ? thanks Link to comment Share on other sites More sharing options...
tmk Posted April 15, 2014 Share Posted April 15, 2014 Try this: var query = $.ajax({ type: 'POST', headers: { "cache-control": "no-cache" }, url: baseDir + 'modules/carriercompare/ajax.php' + '?rand=' + new Date().getTime(), data: 'method=getCarriers&id_country=' + $('#id_country').val() + '&id_state=' + $('#id_state').val() + '&zipcode=' + $('#zipcode').val(), dataType: 'json', success: function(json) { if (json.length) { var html = ''; $.each(json, function(index, carrier) { html += '<tr class="'+(index % 2 ? 'alternate_' : '')+'item">'+ '<td class="" width="64px">'+ ' <input type="radio" name="carrier_price_value" value="'+ ((displayPrice == 1) ? carrier.price_tax_exc : carrier.price) +'" id="id_carrier'+carrier.id_carrier+'" '+(id_carrier == carrier.id_carrier ? 'checked="checked"' : '')+'/>'+ '</td>'+ '<td class="carrier_name">'+ '<label for="id_carrier'+carrier.id_carrier+'">'+ (carrier.img ? '<img src="'+carrier.img+'" alt="'+carrier.name+'" />' : carrier.name)+ '</label>'+' '+ ((carrier.delay != null) ? carrier.delay : '') + '</td>'+ '<td class="carrier_price">'; if (carrier.price) { html += '<span class="price">'+(displayPrice == 1 ? formatCurrency(carrier.price_tax_exc, currencyFormat, currencySign, currencyBlank) : formatCurrency(carrier.price, currencyFormat, currencySign, currencyBlank))+'</span>'; } else { html += txtFree; } html += '</td>'+ '</tr>'; }); $('#carriers_list').append(html); and of course remove one <th> in tpl file to achieve this: <div id="availableCarriers"> <table cellspacing="0" cellpadding="0" id="availableCarriers_table" class="std"> <thead> <tr> <th class="carrier_action first_item"></th> <th class="carrier_name item">{l s='Carrier' mod='carriercompare'}</th> <th class="carrier_price last_item">{l s='Price' mod='carriercompare'}</th> </tr> </thead> <tbody id="carriers_list"> </tbody> </table> </div> Link to comment Share on other sites More sharing options...
gudule1er Posted April 15, 2014 Author Share Posted April 15, 2014 yes i remove one <th> in tpl file not work Link to comment Share on other sites More sharing options...
gudule1er Posted April 17, 2014 Author Share Posted April 17, 2014 it's ok the file to edit it in /theme/your_theme/js/module/carreircompare/carriercompare.js thanks for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now