Jump to content

Qvixx

Members
  • Posts

    75
  • Joined

  • Last visited

Profile Information

  • Activity
    Project Owner

Qvixx's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Hello, Which PS-Version do you use? Is is the default-OPC or do you use a OPC-module? In PS 1.6.0.9 this is the default behaviour. Greets
  2. return Db::getInstance()->executeS(' SELECT * , COUNT(*) as nb FROM `'._DB_PREFIX_.'feature` f LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON f.`id_feature` = fp.`id_feature` LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl ON f.`id_feature` = fl.`id_feature` WHERE fp.`id_product` IN ('.$ids.') AND `id_lang` = '.(int)$id_lang.' GROUP BY f.`id_feature` ORDER BY nb DESC, position ASC I would still prefer this one. It doesn't really make sense to compare features which aren't availlable on all the products.
  3. I'm not an expert, so I hope someone can look through this change. The code in classes/Feature.php looks like this (near line 246): return Db::getInstance()->executeS(' SELECT * , COUNT(*) as nb FROM `'._DB_PREFIX_.'feature` f LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON f.`id_feature` = fp.`id_feature` LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl ON f.`id_feature` = fl.`id_feature` WHERE fp.`id_product` IN ('.$ids.') AND `id_lang` = '.(int)$id_lang.' GROUP BY f.`id_feature` ORDER BY nb DESC That means the features are only sorted by the amount of products which have them set. That means features which are set in all products come before features that are set in only one product. Like this they should be sorted first by the number amount of products which have them set AND AFTERWARDS by their position: return Db::getInstance()->executeS(' SELECT * , COUNT(*) as nb FROM `'._DB_PREFIX_.'feature` f LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON f.`id_feature` = fp.`id_feature` LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl ON f.`id_feature` = fl.`id_feature` WHERE fp.`id_product` IN ('.$ids.') AND `id_lang` = '.(int)$id_lang.' GROUP BY f.`id_feature` ORDER BY nb DESC, position ASC And like this they should only be sorted by their Position return Db::getInstance()->executeS(' SELECT * , COUNT(*) as nb FROM `'._DB_PREFIX_.'feature` f LEFT JOIN `'._DB_PREFIX_.'feature_product` fp ON f.`id_feature` = fp.`id_feature` LEFT JOIN `'._DB_PREFIX_.'feature_lang` fl ON f.`id_feature` = fl.`id_feature` WHERE fp.`id_product` IN ('.$ids.') AND `id_lang` = '.(int)$id_lang.' GROUP BY f.`id_feature` ORDER BY position ASC This depends on which behaviour you want to achieve. Greets
  4. Hello, I don't think that it is a good idea to remove these fields from the Form. It is often the case that you let deliver something to another address than your own. I would prefer using some javascript that updates the Firstname and Lastname in the second part when leaving the field in the first part.
  5. Hi, Yeah i had the same issue. Did you add any custom fields? Additional text-fields or something like that? Greets
  6. Hi Folks, This is just a technical question not a problem-related one. I started playing around with the prestashop-core and the following question came up: Nearly all controllers extend the class FrontController. For Example: class somethingControllerCore extends FrontController But where is the FrontController-class defined? I can just find the FrontControllerCore-class. Is this class overridden somewhere or is it something different? I know it's a wierd quesion but i just want to look through it. Thanks for any answers!
  7. Hi Everybody, I've got a little problem over here which seems a little strange to me. PS-Version: 1.6.0.6 I created a new product-field called 'ist_muster'. It is a boolean field which should be changeable in the backoffice by a checkbox. STEP 1: I created a Database-Field in the two tables ps_product and ps_product_shop. They are tiny-int fields with a length of 1. STEP 2: I created an override for the Product-Class: (I did NOT forget to delete the cache!) <?php Class Product extends ProductCore { public $ist_muster; public function __construct($id_product = null, $full = false, $id_lang = null, $id_shop = null, Context $context = null) { self::$definition['fields']['ist_muster'] = array('type' => self::TYPE_BOOL, 'shop' => true, 'validate' => 'isBool'); parent::__construct($id_product, $full, $id_lang, $id_shop, $context); } } ?> STEP 3: I changed the Informations.tpl like this: <label class="control-label col-lg-3" for="available_for_order"> {if isset($display_multishop_checkboxes) && $display_multishop_checkboxes} {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="available_for_order" type="default"} {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="show_price" type="show_price"} {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="online_only" type="default"} {include file="controllers/products/multishop/checkbox.tpl" only_checkbox="true" field="ist_muster" type="default"} {/if} {l s='Options'} </label> <div class="col-lg-5"> <p class="checkbox"> <input type="checkbox" name="available_for_order" id="available_for_order" value="1" {if $product->available_for_order}checked="checked"{/if} /> <label for="available_for_order">{l s='Available for order'}</label> </p> <p class="checkbox"> <input type="checkbox" name="show_price" id="show_price" value="1" {if $product->show_price}checked="checked"{/if} {if $product->available_for_order}disabled="disabled"{/if}/> <label for="show_price">{l s='Show price'}</label> </p> <p class="checkbox"> <input type="checkbox" name="online_only" id="online_only" value="1" {if $product->online_only}checked="checked"{/if} /> <label for="online_only">{l s='Online only (not sold in your retail store)'}</label> </p> <p class="checkbox"> <input type="checkbox" name="ist_muster" id="ist_muster" value="1" {if $product->ist_muster}checked="checked"{/if} /> <label for="ist_muster">{l s='Muster'}</label> </p> </div> As you can see i just copied things from online_only. I want my field to behave like 'online_only'. I can check the checkbox an save the article. Everything works fine. My problem occurs when I uncheck a checkbox an save the product. The Value is not saved it just remains 1 (checked). I have to set the value to 0 manually in the two tables which is very annoying. I just can't figure out where the problem is! Greets
  8. Hi, if $page_name == "module-bankwire-payment" OR if $page_name == "module-cheque-payment" OR ...... Works like a charm! Thank you! Just for information: How did you figure them out? I looked for them everywhere but did not find anything.
  9. I need your help again. I want the last payment-page to be span12 and not span9. The page where you confirm you order (aftter choosing a payment-method). My problem is that I don't know how to 'call' this page in the header.tpl. This is the current code: <div id="center_column" class="center_column span{if $page_name == "index" OR $page_name == "cms" OR $page_name =="order"}12{else}9{/if} clearfix"> I tried $page_name == "payment" and so on and so on but it didn't change anything. I have also thought about editing the width manually in global.css. But is would not be as 'clean' as changing span9 to span12... Thanks!
  10. It is because PayPal is hooked to the right column. Try unhooking it from the homepage: modules->positions.
×
×
  • Create New...