Jump to content

Mykhailo

Members
  • Posts

    17
  • Joined

  • Last visited

Profile Information

  • Location
    Ukraine
  • Activity
    Other

Recent Profile Visitors

482 profile views

Mykhailo's Achievements

Newbie

Newbie (1/14)

9

Reputation

1

Community Answers

  1. Hi! I'm struggling to pass an additional field value from checkout process to order, but have no luck. Maybe somebody can help me? I've created input on checkout page, where the user enters a value. I need to write this value to new column in order, when the checkout is complete. I've extended ps_order table and order.php class, adding there our new field, but I have no idea how to pass the value from checkout template to order table.
  2. Hi guys! None of mentioned above solutions worked for me. Always getting Error: redirect_uri_mismatch PS v1.6.0.9 GAPI v1.0.3 Have somebody already reported this issue on Forge?
  3. Have not tried with commas without spaces, 'cause the spaces are exactly what I need there I'm using a workaround: importing with dots and spaces and then changing dots to commas. But it feels so wrong.
  4. Pretty weird, 'cause space with dots values (like "red. blue. yellow.") are imported without any issue, while values with space and comma ("red, blue, yellow") get truncated. So the space does not matter here?
  5. I tried different multiple values delimiters - no luck. comma (obviously fails), double quotes. It imports okay values with dots in it (i.e. attribute1: blue. red. yellow) , but not with commas.
  6. Hi! I have similar problem, but with text values. I'm trying to import like: attribute1: blue, red, white attribute2: red, green, yellow but after import I get just: attribute1: blue attribute2: red It looks like CSV import tool cuts of the value after first comma. I'm using version 1.6.0.9, ; as field delimiter, " as value delimiter.
  7. I have no idea, actually, I'm running the latest version right now PS. Just a quick update to the solution: Do not forget to change your Product.php class in order to save decimal quantities in back end.
  8. Same problem here, no sass folder in theme directory on v.1.6.0.9. Can somebody shed some light on this?
  9. Hi, here's a solution that works for me (version 1.6.0.9): 1) Change the database quantity related fields type to DECIMAL (17,2). ps_product: quantity, minimal_quantity ps_order_return_detail: product_quantity ps_pack: quantity ps_product_attribute: quantity, minimal_quantity ps_product_sale: quantity ps_stock: physical_quantity, usable_quantity ps_cart_rule: quantity, quantity_per_user ps_customization: quantity, quantity_refunded, quantity_returned ps_order_detail: product_quantity, product_quantity_in_stock, product_quantity_refunded, product_quantity_return ps_specific_price_rule: from_quantity ps_order_slip_detail: product_quantity ps_supply_order_detail: quantity_recieved, quantity_expected ps_stock_avaible: quantity ps_cart_product: quantity ps_stock_mvt: physical_quantity ps_cart_rule_product_rule_group: quantity 2) Change declarations and checks related to variables like quantity, qty and similar from int to float. 2.1) For examle: Override the OrderDetail.php class with following changes: line 170-173 'product_quantity' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'required' => true), 'product_quantity_in_stock' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'product_quantity_return' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'product_quantity_refunded' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'product_quantity_reinjected' =>array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), line 180 'product_quantity_discount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), line 191 'discount_quantity_applied' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), line 562 $this->product_quantity = (float)($product['cart_quantity']) line 570-571 $productQuantity = (float)(Product::getQuantity($this->product_id, $this->product_attribute_id)); $this->product_quantity_in_stock = ($productQuantity - (float)($product['cart_quantity']) < 0) ? $productQuantity : (float)($product['cart_quantity']); Remaining classes to check and override are: Order.php Customization.php Cart.php Product.php 2.2) Override front controllers: CartController.php ProductController.php OrderOpcController.php 2.3) Override admin controllers: AdminOrdersController.php AdminCartsController.php AdminProductsController.php 2.4) Change admin template file /admin/themes/default/template/controllers/orders/controllers/orders/_product_line.tpl line 69 <span class="product_quantity_show{if (float)$product['product_quantity'] > 1} badge{/if}">{$product['product_quantity']}</span> Basically this allows you to see decimal quantity in orders (ORDERS->Orders) from back office. 2.5) Change your theme templates: order-detail.tpl shopping-cart.tpl product.tpl 2.6) Change your theme blockcart module: blockcart-json.tpl blockcart.tpl blockcart.php 2.7) Change your theme js files: order-opc.js line 932 newTotalQty += parseFloat($(this).val()); line 944 totalQty += parseFloat($(this).val()); product.js line 250 var currentVal = parseFloat($('input[name='+fieldName+']').val()); line 264 var currentVal = parseFloat($('input[name='+fieldName+']').val()); cart-summary.js line 346 - new RegExp checks floats instead of integers, this allows to manually change and automatically update product quantity during checkout on cart page. var exp = new RegExp("^[0-9]+\.[0-9]+$"); line 352 var QtyToUp = parseFloat(input) - parseFloat(hidden); line 354 if (parseFloat(QtyToUp) > 0) line 356 else if(parseFloat(QtyToUp) < 0) line 442 (parseFloat(jsonData.summary.products[i].customization_quantity) > 0)) line 801 nbrProducts += parseFloat(product_list[i].quantity); So, that’s it. Actually there is more work to do to change customer account views in order to represent decimal values. Maybe some other templates still to change. Anyway, this basically does the trick.
  10. Hi! I'm working on the same problem. Have you already found a solution?
  11. Hi. I have a problem with layered navigation block. As I'm using price slider to allow customer filtering products I've noticed some buggy behaviour. The problem appears when after setting price range you decide to select or deselect other features or attributes in filters. After reloading all the price changes are cancelled, you once again get full price range, from min to max. It seems to be 'default' behaviour now at it's exactly what I get in demo: http://demo.prestashop.com/en/?view=front At the beginning I change max price to 30 and then pick some dress type and get max price of 53 once again.
  12. Hi! I have extended length of standard EAN13 field in database, but field validation in back-end stops me from entering new longer values there. How can I disable this validation? Didn't find anything in informations.tpl file. PS 1.6
  13. Hi! I'm using PS 1.6 and can't find $id_product_attribute = $product->addProductAttribute((float)($info['price']), (float)($info['weight']), 0, (float)($........ controllers/admin/AdminImportcontroller.php So I just adde my fields like 'condition' => array('label' => $this->l('Condition'))); but had no luck - CSV import in admin panel stopped working, Any ideas how to customize csv import in PS 1.6?
  14. So, the issue was in encoding. UTF-8 solved the problem.
×
×
  • Create New...