Jump to content


  • Posts

  • Joined

  • Last visited

Profile Information

  • Location
    Zlin, Czech Republic
  • Activity

MagicFire's Achievements


Newbie (1/14)



  1. Oh, you're right. It was hidden in the minified js. Thanks a lot.
  2. I couldn't find the native PS jQuery in the HTML code, just the mine one.
  3. Hi, I have a problem with showing prices in the list view. This code {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} sometimes returns 0 as price, which is nonsense, because the price is set. And the word sometimes is the key, because this happens in case about 10% of all products. Furthermore, in the detail page, where is used this function {if !$priceDisplay}{convertPrice price=$product->getPrice(true,$smarty.const.NULL, 0,$smarty.const.NULL,false,true)}{/if} it shows the correct one. But this function is unaccessible from the list view. Which controller is passing the data to the list view template (product-list.tpl) ? Or else, what can interfere with the price, so the result will be 0 ? I guess that some variables, that modify the price, some of them probably would be 0, but I couldn't find a list of variables, that can interfere with the price. Thanks a lot for any advice or answer
  4. Hi, I have a big problem with getting to work some custom added pluggins to the jQuery library. I have this structure in head <link media="screen" type="text/css" rel="stylesheet" href="http://www.activitystore.cz/themes/sharpview/css//uniform.default.css"> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"> <script type="text/javascript" src="http://www.activitystore.cz/js/jquery.uniform.js"> the last one script contains the function called uniform(), which aplied to the series of elements should tranform them to the nice ones. Especially I need it for the select elements. But all I get is error message $(...).uniform() is not defined. I tried this alone and it worked. So it must be the PS problem. Thanks for help
  5. Hi, I wonder, why this piece of code public function getOrderPaymentCollection() { $order_payments = new Collection('OrderPayment'); $order_payments->where('order_reference', '=', $this->reference); return $order_payments; } from Order.php:1406 does not return anything. In template invoice.tpl {foreach from=$order_invoice->getOrderPaymentCollection() item=payment} <tr> <td style="width: 50%">{$payment->payment_method}</td> <td style="width: 50%">{displayPrice price=$payment->amount currency=$order->id_currency}</td> </tr> {foreachelse} <tr> <td>{l s='No payment' pdf='true'}</td> </tr> {/foreach} show just No payment. I wonder why, I check the DB, the order reference is correct between the ps_orders and ps_order_payment. Still nothing. I was thinking about create my custom function with custom sql query, but how can I get the return value from php functon (array of vaules from query) in Order.php to put it to the tempalte file invoice.tpl. Thanks
  6. Hi, I have two problems. I'm using Unviversal Payment module. And here is the problem. If I assign some payments to exact carrier, these rules are ignored. So simply it shows all the payment options for all carriers. Have anybody had any similiar problem? Second is much more tricky. Sometimes when I'm logged in, it shows me, that there aren't any carriers available, but when I logout and log in again with the same account, now it shows the right list of carriers. So I don¨t think there is a bug in system, but something is messing up with the carriers list. Perhaps some module? Thanks
  7. OK, now it seems working. Thank you very much.
  8. Yes, it's the autoincrement ID. So maybe this could be the problem? How can I insert empty value? So it will fill it with the autoincrement value?
  9. No, it won't work. It simply doesn't insert anything. And this problem is focusing only to my plugin. Others working well. So I guess there must be something with permission (or anything like that). Because it doesn't throw any error message, even with all debuging on. Strange is, that when I try to force him to do this function,it leaves the blank page (but no error, nothing, just blank page). I've never has any experience with behavior like this.
  10. Hi, I have a problem. My PS 1.5.2 refuses to execute valid SQL statement. I don't know why. The code is: Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,"'.$name.'", '.$position.')'); which leads to result INSERT INTO `ps_slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,"Filter_bg.png", 1) which is absolutely correct. If I take this result and copy it to the phpmyadmin SQL console, it works. So could anybody please tell me, where could be the problem? I found out, that even a pure php functions isn't working too. But selecting is ok. Could be some permission problem? It's my own plugin. But if I can do select sqls why not the insert ones? If I do this: $sql = "INSERT INTO `"._DB_PREFIX_."slider` (`id_slider_image`,`name`, `position`) VALUES (NULL,'".$name."', ".$position.")"; $result = mysql_query($con,$sql) or die("Bad query: " . mysql_error()); it exists with this: Bad query: Where could be problem? Thanks
  11. I forget,that if you enter the quantity for the product and than you add the combinations, the quantity is deleted and you have to enter the new quantities for each combination.
  12. Hi, is there a way how to achieve AJAX update of shipping price? Because I've set that the shipping price is free from some value of cart. That feature is working all right. But when customer makes a change ( delete produkt from basket), the carrier table is not refreshed. It keeps the old values. I've searched and found nothing. Is there some refresh function in CarrierController which I can call to refresh the carrier table? Thanks
  13. Hi, I have a problem with diplaying attributes and their groups in the product detail page. Here is the result from my phpadmin when I run extracted sql query. Černá = Black, Velikost= Size. Just proof,that attributes are correctly in DB. Unfortunatelly following code from method assignAttributesGroups from ProductControlleru:341 $colors = array(); $groups = array(); // @todo (RM) should only get groups and not all declination ? $attributes_groups = $this->product->getAttributesGroups($this->context->language->id); if (is_array($attributes_groups) && $attributes_groups) { $combination_images = $this->product->getCombinationImages($this->context->language->id); $combination_prices_set = array(); foreach ($attributes_groups as $k => $row) { // Color management if ((isset($row['attribute_color']) && $row['attribute_color']) || (file_exists(_PS_COL_IMG_DIR_.$row['id_attribute'].'.jpg'))) { $colors[$row['id_attribute']]['value'] = $row['attribute_color']; $colors[$row['id_attribute']]['name'] = $row['attribute_name']; if (!isset($colors[$row['id_attribute']]['attributes_quantity'])) $colors[$row['id_attribute']]['attributes_quantity'] = 0; $colors[$row['id_attribute']]['attributes_quantity'] += (int)$row['quantity']; } if (!isset($groups[$row['id_attribute_group']])) $groups[$row['id_attribute_group']] = array( 'name' => $row['public_group_name'], 'group_type' => $row['group_type'], 'default' => -1, ); $groups[$row['id_attribute_group']]['attributes'][$row['id_attribute']] = $row['attribute_name']; if ($row['default_on'] && $groups[$row['id_attribute_group']]['default'] == -1) $groups[$row['id_attribute_group']]['default'] = (int)$row['id_attribute']; if (!isset($groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']])) $groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']] = 0; $groups[$row['id_attribute_group']]['attributes_quantity'][$row['id_attribute']] += (int)$row['quantity']; if ($row['available_date'] != '0000-00-00 00:00:00' && $row['available_date'] != '0000-00-00') $available_date = Tools::displayDate($row['available_date'], $this->context->language->id); else $available_date = $row['available_date']; $combinations[$row['id_product_attribute']]['attributes_values'][$row['id_attribute_group']] = $row['attribute_name']; $combinations[$row['id_product_attribute']]['attributes'][] = (int)$row['id_attribute']; $combinations[$row['id_product_attribute']]['price'] = (float)$row['price']; // Call getPriceStatic in order to set $combination_specific_price if (!isset($combination_prices_set[(int)$row['id_product_attribute']])) { Product::getPriceStatic((int)$this->product->id, false, $row['id_product_attribute'], 6, null, false, true, 1, false, null, null, null, $combination_specific_price); $combination_prices_set[(int)$row['id_product_attribute']] = true; $combinations[$row['id_product_attribute']]['specific_price'] = $combination_specific_price; } $combinations[$row['id_product_attribute']]['ecotax'] = (float)$row['ecotax']; $combinations[$row['id_product_attribute']]['weight'] = (float)$row['weight']; $combinations[$row['id_product_attribute']]['quantity'] = (int)$row['quantity']; $combinations[$row['id_product_attribute']]['reference'] = $row['reference']; $combinations[$row['id_product_attribute']]['unit_impact'] = $row['unit_price_impact']; $combinations[$row['id_product_attribute']]['minimal_quantity'] = $row['minimal_quantity']; $combinations[$row['id_product_attribute']]['available_date'] = $available_date; if (isset($combination_images[$row['id_product_attribute']][0]['id_image'])) $combinations[$row['id_product_attribute']]['id_image'] = $combination_images[$row['id_product_attribute']][0]['id_image']; else $combinations[$row['id_product_attribute']]['id_image'] = -1; } // wash attributes list (if some attributes are unavailables and if allowed to wash it) if (!Product::isAvailableWhenOutOfStock($this->product->out_of_stock) && Configuration::get('PS_DISP_UNAVAILABLE_ATTR') == 0) { foreach ($groups as &$group) foreach ($group['attributes_quantity'] as $key => &$quantity) if (!$quantity) unset($group['attributes'][$key]); foreach ($colors as $key => $color) if (!$color['attributes_quantity']) unset($colors[$key]); } foreach ($combinations as $id_product_attribute => $comb) { $attribute_list = ''; foreach ($comb['attributes'] as $id_attribute) $attribute_list .= '\''.(int)$id_attribute.'\','; $attribute_list = rtrim($attribute_list, ','); $combinations[$id_product_attribute]['list'] = $attribute_list; } $this->context->smarty->assign(array( 'groups' => $groups, 'combinations' => $combinations, 'colors' => (count($colors)) ? $colors : false, 'combinationImages' => $combination_images)); } makes, that variable $groups is empty (in template during test isset($groups) ). So apparently the database returns correct data, but the controller doesn't show them. Do you have any iddeas why? Thanks
  • Create New...