Jump to content

Atilale1

Members
  • Posts

    0
  • Joined

  • Last visited

Everything posted by Atilale1

  1. Hi Aron, In file \your_prestashop\modules\printlabel\myPDF.php, try adding the following: $phone = utf8_decode($this->ad->phone); just after the line $ville = utf8_decode($this->ad->city); and change line: $pdf->MultiCell($this->LabelWidth - $this->BoxMarginRight - $this->BoxMarginLeft - $this->InnerMarginLeft - $this->DocMarginLeft, 8, $entreprise.(strlen($entreprise)!=0?"\n":"")."$nom $prenom\n$champadresse1 \n$champadresse2".((strlen($champadresse2)!=0)?"\n":"")."$codepostal $ville \n$country\n", 0, 'L'); to something like that: $pdf->MultiCell($this->LabelWidth - $this->BoxMarginRight - $this->BoxMarginLeft - $this->InnerMarginLeft - $this->DocMarginLeft, 8, $entreprise.(strlen($entreprise)!=0?"\n":"")."$nom $prenom\n$champadresse1 \n$champadresse2".((strlen($champadresse2)!=0)?"\n":"")."$codepostal $ville \n$country\nTeléfono: $phone\n", 0, 'L'); Some warnings: User can introduce a mobile phone number or land line phone number, so if it works, you can modify your code with something like that: $phone = (strlen(utf8_decode($this->ad->phone))!=0?utf8_decode($this->ad->phone):utf8_decode($this->ad->phone_mobile)); In the code, I have hard coded the some text printed on the label, it's in Spanish, feel free to change it to be managed by prestashop translation system. I work on Perstashop V14. I don't have any test version of my prestashop so I can't make any test: I just look at the Database content for address and found that there are 2 phones numbers. Remember to force smarty compilation to see the changes Hope this help Atila
  2. Hi, Thank you very much Wandry for this module. I have made some changes to it because I am using an Inkjet printer and A4 label sheets (with 4 labels per sheet). I have added inputs when you print the label so you can choose on which label you want to print (2 rows: 0 and 1, 2 lines 0 and 1). I print the name and direction of my shop. I have prepared the code to change the size of the labels. When I'll have some time, I will improve it a bit more in order to be able to configure the size and place of the labels directly from the back office. I am working also on a version that will take a serie of order and automatically print the labels. Hope this help. Atila printlabel v02.zip
  3. Hi everybody, I have solved my problem: when you remove the last item in your cart, the page goes white!!! In \themes\matrice\js\cart-summary.js, near line 88 you find: $('#order-detail-content').children().each(function() { if ($(this).attr('id') != 'emptyCartWarning' && $(this).attr('class') != 'breadcrumb' && $(this).attr('id') != 'cart_title') { $(this).fadeOut('slow', function () { $(this).remove(); }); } }); change by: $('#cart_detail_start').children().each(function() { if ($(this).attr('id') != 'emptyCartWarning' && $(this).attr('class') != 'breadcrumb' && $(this).attr('id') != 'cart_title') { $(this).fadeOut('slow', function () { $(this).remove(); }); } }); then in file \themes\matrice\shopping-cart.tpl, just before line 69 add a span tag like that: <span id="cart_detail_start"> <p>{l s='Your shopping cart contains'} <span id="summary_products_quantity">{$productNumber} {if $productNumber == 1}{l s='product'}{else}{l s='products'}{/if}</span></p> Then in line 293, close the span tag, like this: </span> </div> {/if} <div id="HOOK_SHOPPING_CART">{$HOOK_SHOPPING_CART}</div> And that's it. If somebody else can try the fix and let me know if it works form him, it would be great! Cheers.
  4. Hi Bravchik, How did you manage the delete in the cart? It work perfectly in your shop. Thanks
  5. Hi everybody, I have installed Matrice theme on PS 1.4.7.3 and after doing some little changes, I was able to use the ajax shopping cart. To make a long story short, I'll start with the animation: default behavior is to retrieve the position of the shopping cart on the left column and move the image of the product from its current position to the shopping cart position. Problem: if you remove the shopping cart on the left column, the animation doesn't work. Look into the file ajax-cart.js in modules\blockcart\, around line 220 it says: var cartBlockOffset = $('#cart_block').offset(); change it by var cartBlockOffset = $('#header_user').offset(); and it should work. Don't forget to clear the cache or you won't see the change (in back office in preferences, force smarty compilation) Now the second problem I faced was that, when I add a product to the cart, the ajax shopping cart just changed to show 1 product but doesn't display the "view" and the "chechout" links. I modified the following files: ajax-cart.js in modules\blockcart\, around line 593, function updateCartEverywhere, add the following lines: $('.ajax_cart_product').show(); // Show the view cart and Checkout options $('.ajax_cart_product').hide(); // Hide the view cart and Checkout options See the code below. updateCartEverywhere : function(jsonData) { $('.ajax_cart_total').text(jsonData.productTotal); $('.ajax_cart_shipping_cost').text(jsonData.shippingCost); $('.ajax_cart_tax_cost').text(jsonData.taxCost); $('.cart_block_wrapping_cost').text(jsonData.wrappingCost); $('.ajax_block_cart_total').text(jsonData.total); if(parseInt(jsonData.nbTotalProducts) > 0) { $('.ajax_cart_no_product').hide(); $('.ajax_cart_quantity').text(jsonData.nbTotalProducts); $('.ajax_cart_quantity').fadeIn('slow'); $('.ajax_cart_total').fadeIn('slow'); $('.ajax_cart_product').show(); // Show the view cart and Checkout options if(parseInt(jsonData.nbTotalProducts) > 1) { $('.ajax_cart_product').show(); // Show the view cart and Checkout options $('.ajax_cart_product_txt').each( function () { $(this).hide (); }); $('.ajax_cart_product_txt_s').each( function () { $(this).show(); }); } else { $('.ajax_cart_product_txt').each( function () { $(this).show(); }); $('.ajax_cart_product_txt_s').each( function () { $(this).hide(); }); } } else { $('.ajax_cart_quantity, .ajax_cart_product_txt_s, .ajax_cart_product_txt, .ajax_cart_total').each( function () { $(this).hide(); }); $('.ajax_cart_no_product').show('slow'); $('.ajax_cart_product').hide(); // Hide the view cart and Checkout options } } }; Remember to do the cache cleanup before testing the change... BUT... I still have a problem: when I am in the cart page, if I delete all the products, then I have an empty white page instead of an empty cart... Any idea? Thanks. Update: I forgot something: to make the last change work, you have to modify matrice\modules\blockuserinfo\blockuserinfo.tpl. Near line 44, change this <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span> <span class="ajax_cart_product{if $cart_qties != 1} hidden{/if}"> {l s='product' mod='blockuserinfo'} <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span> <a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a> <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a> </span> <span class="ajax_cart_product {if $cart_qties < 2} hidden{/if}"> {l s='products' mod='blockuserinfo'} <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span> <a href="{$base_dir_ssl}order.php" title="{l s='View' mod='blockuserinfo'}">{l s='view' mod='blockuserinfo'}</a> <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a> </span> by this <span class="ajax_cart_quantity">{if $cart_qties > 0}{$cart_qties}{/if}</span> <span class="ajax_cart_product{if $cart_qties < 1} hidden{/if}"> {l s='product(s)' mod='blockuserinfo'} <span class="ajax_cart_total">{if $cart_qties > 0}{convertPrice price=$cart->getOrderTotal(true)}{/if}</span> <a href="{$base_dir_ssl}order.php" title="{l s='view' mod='blockuserinfo'}">{l s='View' mod='blockuserinfo'}</a> <a href="{$base_dir_ssl}order.php?step=1" id="button_order_cart" title="{l s='check out' mod='blockuserinfo'}">{l s='check out' mod='blockuserinfo'}</a> </span> The main difference is that you will see: "1 product(s)" or "2 product(s)" instead of "1 product" or "2 products".
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More