Jump to content

jahyax

Members
  • Posts

    102
  • Joined

  • Last visited

Contact Methods

  • Skype
    jahyax

Profile Information

  • Activity
    Freelancer

Recent Profile Visitors

6,096,914 profile views

jahyax's Achievements

Newbie

Newbie (1/14)

6

Reputation

  1. How do you display prices and discount properly Example: if the Price is 100(tax excl) and discount of 10(tax excl) the display on font office should be originalPrice: 100 discount and save -10 and price is 90, but front office is displaying originalPrice: 100 discount and save -10.50 and price is 90. is there any way to properly display the prices and and discount calculation properly, there seems to be no setting for this in back office.
  2. I am importing products via CSV, the import goes well without error, The products price, name, quantity, are all set good and all other columns that I set, except that I noticed that on products Category is not set properly, example: I set like 20 products into category on CSV to 'Category-A' but after the import, the Category is set into 'Home' not into 'Category-A', but when you clicked on the individual product ,going to association Tab,the default category is set Properly. is this a bug, or there is a settings that I need to activate to properly set category on product list the problem that i have, that goes with this, is on the front page, because when i search for Category-A, it will not return the products on that Category,because it is set on 'Home'
  3. how do you retrieve each value on a jQuery serialize array var datArr = $("form").serializeArray(); $.ajax({ url: "<path to php file>", type: "POST", headers: {"cache-control": "no-cache"}, data: datArr, dataType: "json", success: function(result){ console.log(result.returned_val); } }); <form> <input id="val1" name="val1" type="text" value="" /> <input id="val2" name="val2" type="text" value="" /> </form> and on my php file is $datArr = Tools::getValue('datArr'); $arrVars = array(); foreach ($datArr as $key => $value) { $arrVars = $key; } echo json_encode(array('returned_val' => $arrVars['val1']); i get a null on my console.log How do i properly retrieve serialize array and return them back.
  4. Thanks for helping out, I manage to solve Post method problem from javascript by correcting the right path where my php file is located like " url : '{$base_dir}modules/modulename/file-name.php' " and using the Send mail syntax that "jsmit2" posted I was able to send an email.
  5. thanks for the reply, I will check this out, but somehow I have a related issue, it seems that when posting via javascript, it is having an error like POST: <url> 404 (not Found) from what i have understand on error,it cannot find the file(php file),but when i check the url, where my javascript will supposed to POST , the file is there
  6. I'm trying to create a custom form (module) that a customer would fill up, and then send email , current I just used to input form and a submit button, when click there is no error,but no email sent or receive. **Note: this is similar to send a friend module (but I am planning to ad more input form) this is my display.tpl <script type="text/javascript"> {literal} $('document').ready(function(){ $('#sendQuote').click(function(){ var name1 = $('#name1').val(); var email = $('#email').val(); if (name1 && email) { $.ajax({ {/literal}url:"{$my_quotation_link}"{literal}, type: "POST", headers: {"cache-control": "no-cache"}, data: {action: 'sendQuote', name1:name1, email:email}, dataType: "json", success: function(result){ console.log(email); console.log('Hello'); } }); }else{ console.log('Fail'); } }); }); {/literal} </script> This is Lumberyard <br/> <form method="post" action="{request_uri}" class="lmbr"> {l s="Name"} <input id="name1" name="name1" type="text" name="name1" value="" size="14" /> {l s="Name"} <input id="email" name="email" type="text" name="email" value="" size="20" /> <input id="sendQuote" class="button" name="sendQuote" type="submit" value="Send Quotation" /> </form> and this is my quotation ajax <?php require_once(dirname(__FILE__).'/../../config/config.inc.php'); require_once(dirname(__FILE__).'/../../init.php'); include_once(dirname(__FILE__).'/mymodule.php'); $module = new MyModule(); if (Tools::getValue('action') == 'sendQuote') { $name1 = Tools::getValue('name1'); $email = Tools::getValue('email'); }else{ $name1 = 'Name1'; $email = 'email'; } $templateVars = array( '{name1}' => Tools::safeOutput($name1), '{email}' => Tools::safeOutput($email) ); if (!Mail::Send((int)$module->context->cookie->id_lang, 'send_quote', 'Quotation', $templateVars, $email, null, ($module->context->cookie->email ? $module->context->cookie->email : null), null, null, null, dirname(__FILE__).'/mails/')) die('0'); die('1'); die('0'); ?> I am also attaching my complete module for your reference mymodule.zip
  7. Can anyone help on how to properly edit shopping-cart-product-line.tpl, on line 39 i have made changes on the price display <td class="cart_unit" data-title="{l s='Unit price'}"> <ul class="price text-right" id="product_price_{$product.id_product}_{$product.id_product_attribute}{if $quantityDisplayed > 0}_nocustom{/if}_{$product.id_address_delivery|intval}{if !empty($product.gift)}_gift{/if}"> {if !empty($product.gift)} <li class="gift-icon">{l s='Gift!'}</li> {else} {if isset($product.is_discounted) && $product.is_discounted} <li> {if !$priceDisplay} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}"> {'Limit:'} {$product.discount_limit}<br/> {'On Limit'}{convertPrice price=$product.price_wt} {assign var='symbol' value=$currency->sign}<br/> {'Abv. Limit'}{convertPrice price=$product.price_wt + $product.reduction} {assign var='symbol' value=$currency->sign} </li> {else} {* <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}"> {'Limit:'} {$product.discount_limit}<br/> {'On Limit'}{convertPrice price=$product.price_wt} {assign var='symbol' value=$currency->sign}<br/> {'Abv. Limit'}{convertPrice price=(($product.price_wt + $product.reduction) / $product.price_without_specific_price)* 100 * -1} {assign var='symbol' value='%'} </li> *} {/if} {else} {if isset($product.reduction_type) && $product.reduction_type == 'amount'} <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}"> {'Limit:'} {$product.discount_limit}<br/> {'On Limit'}{convertPrice price=$product.price} {assign var='symbol' value=$currency->sign}<br/> {'Abv. Limit'}{convertPrice price=$product.price + $product.reduction} {assign var='symbol' value=$currency->sign} </li> {else} {* <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}"> {'Limit:'} {$product.discount_limit}<br/> {'On Limit'}{convertPrice price=$product.price} {assign var='symbol' value=$currency->sign}<br/> {'Abv. Limit'}{convertPrice price=(($product.price + $product.reduction) / $product.price_without_specific_price)* 100 * -1} {assign var='symbol' value='%'} </li> *} {/if} {/if} </li> {else} {if !$priceDisplay} <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price_wt}</li> {else} <li class="price{if isset($product.is_discounted) && $product.is_discounted} special-price{/if}">{convertPrice price=$product.price}</li> {/if} {/if} {/if} </ul> </td> my problem is every time i click on the '+' or '-' button the display revert back to original display, unless i refresh the browser, can anyone help me please for the work around on this issue
  8. i manage to make this work with local server but the animation does not work.. any help please.
  9. I use mitsos suggestion it still does not work on my end, any other solution please?
  10. are this fix or solved bugs included in the 1.6.0.10 testing package of prestashop?
  11. I am trying to create a module with custom Tab(menu) and a have custom controller, and on that menu I want to display some info from a tpl file i have like.. *during the installation of the module, It inserts data into the database which then create a new tab.. please see the attached image..'new-menu-ps1609.jpg' but, i dont know how to put a display on that menu.. i also created a contoller on the /modules/mymodule/MyModule.php and on that file ihave the following contents.. class MyModule extends AdminController { protected $html = ''; public function __construct() { $this->bootstrap = true; $this->table = 'product'; $this->className = 'Product'; parent::__construct(); $this->viewDisplay(); } public function viewDisplay() { return $html .= "<div><p>Custom Product List</p></div>"; } } ***but i am getting a blank display like 'new-menu-blank.jpg' can anyone help me on the work around for this?
  12. I was looking some thing similar like this, in my case its shirt i have like S, M, L, for size and color availability is according to size of shirt. green, blue, is only available for S black, red for M yellow, white, for L if i select S, i want only to display in color picker the green and blue, and hide other color. any update on this one mate?
  13. I am trying to create a module that will allow the user to pick its delivery date and choose the available hour, I want to save the date selected and the hour selected, My problem is, I dont know where to post the data that it will be save into the cart and order here is the sample of my javascript code: <script type="text/javascript"> $('#hr-sel').on('change', function() { updateDelivery(); }); function updateDelivery(){ var delivery_date = $("#alternate").val(); var delivery_hour = $('#hr-sel :selected').text(); $.ajax({ type: 'POST', url: ../views/templates/hook/shippingdate.php, async: false, cache: false, datatype: 'json', data: 'delivery_date='+delivery_date+'&delivery_hour='+delivery_hour, success: function (jsonData){ console.log(jsonData); } }); } </script> and on my shippingdate.php I have function hookActionCarrierProcess($params) { $cart = $this->context->cart; $delivery_date = Tools::getValue('shipping_date'); $delivery_hour = Tools::getValue('alternate'); if (!empty($delivery_date)) { $cart->delivery_date = $delivery_date; if (!empty($delivery_hour)) { $cart->delivery_hour = $delivery_hour; } $cart->save(); } } please anyone any idea what I am missing or what I am doing wrong??
×
×
  • Create New...