Jump to content

zombie process

Members
  • Posts

    52
  • Joined

  • Last visited

Contact Methods

Profile Information

  • Location
    Nantes
  • Activity
    Developer

Recent Profile Visitors

464 profile views

zombie process's Achievements

Newbie

Newbie (1/14)

6

Reputation

  1. Actually you don't need to tamper with the validate.js. Try this: At the end of the setCountries function in statesManagement.js, comment out the countries = countriesPS; assignement. Then look for the updateState function. The lines if (typeof states !== 'undefined') { $(states).each(function(key, item){ $('#id_state' + (typeof suffix !== 'undefined' ? '_' + suffix : '')).append('<option value="' + parseInt(item.id) + '"' + (idSelectedCountry === item.id ? ' selected="selected"' : '') + '>' + item.name + '</option>'); should be if (typeof states !== 'undefined' && states.states.length && parseInt(states.contains_states)) { $(states.states).each(function(key, item){ $('#id_state' + (typeof suffix !== 'undefined' ? '_' + suffix : '')).append('<option value="' + parseInt(item.id_state) + '"' + (idSelectedState === item.id_state ? ' selected="selected"' : '') + '>' + item.name + '</option>'); });
  2. Try downloading the prestashop version your presently using (prestashop - PrestaShop e-Commerce Solution - Free Open-Source shopping cart software for Web 2.0 - Google Project Hosting) and overwrite the blowfish class. But this problem is really weird, are you sure no one touched your filestystem?
  3. if you set dev mode to true, what does it output? Is it the same message?
  4. You don't have to get the cart products each time because you already have them (the hook is invoked from the shopping-cart-product-line and the cart's products have already been assigned to smarty). You just need a reference to the current product being displayed. {hook h='pipposhow' mod='pippo' product=$product} public function hookPipposhow($params) { $product = $params['product']; $this->context->smarty->assign(array('id_product' => $product['id_product'])); return $this->display(__FILE__, 'pipposhow.tpl'); }
  5. What is the value (or, more generally, the type of data) you want to output? On what is it based? If it's, for instance, based on the product, you can pass the product (or whatever variable you want) as parameter: {hook h='pipposhow' mod='pippo' product=$product othervar=varvalue} In your hook code, you can retrieve the product like so: $product = $params['product'] don't forget, though, to add the $params parameter to the definition of the hook method: public function hookPipposhow($params) { $product = $params['product']; $othervar = $params['othervar']; your code }
  6. On peut pas passer un prix au panier; le prix de chaque produit est récupéré par la méthode getproductprice dans cart.php (getproducts), pour avoir le cout total (getordertotal). Ce qui peut être envisagé: lorsque que la configuration est ajoutée au panier, créer automatiquement un produit (une copie du produit original), changer son prix (le prix calculé par le configurateur), puis ajouter ce dernier au panier. Le produit qui se retrouve dans le panier n'est donc pas l'original mais le produit configuré. Bien sûr cela demandera comment même des modifs ( principalement au niveau du cartcontroller). Juste une idée.
  7. A callback, in the context of a list (orders or customers, for instance), is a function meant to alter the display of a value. It can, for instance, replace the active/inactive value (which is either 1 or 0) by an icon. the pdf callback outputs a pdf icon. Now, the problem, as far as csv export is concerned, is that it will receive, for most callbacks, html instead of a value. Which screws up the export because you'll have html code in your cells. Solution is to ignore, in the processexport method, the callback param, and just output the raw value.
  8. You're welcome. Just occured to me that it's not SORT BY but ORDER BY; but you sorted it out.
  9. Comment fonctionne le configurateur, est'ce qu'il agit sur un produit ou sur un ensemble de produit (genre un produit principal + les produits qui lui servent d'option de configuration) ?
  10. you can change the rewritten name for the order controller in seo & url. The htacces gets generated on many occasions, if you don't want to have to re-edit your htacess I suggest using a route (check the dispatcher class to see how it works)
  11. Check that the hook has been properly registered. Be sure to include the registerhook call in the module's install method (ie function). Remember that your value is to be used in the pipposhow.tpl that you have to place in your module's views/hook directory. pipposhow.tpl could be like {l s='Pippo show value:' mod='pippo'} {if isset($pipposhow)}{$pipposhow|intval}{/if} the output is then injected into shopping-cart-product-line
×
×
  • Create New...