En visitant ce site, vous acceptez l'utilisation de cookies afin de vous proposer les meilleurs services possibles.

VirtueMart 3.2 - Optimisé et mis en cache

D'après la traduction libre de l'article VirtueMart 3.2 - Cached and Optimized

Des meilleures options d’affichage et une interface graphique d’administration améliorée

Le nouveau traitement de l’affichage des catégories est la fonction la plus intéressante de cette version.

Les nouvelles options des catégories sont généralement mises dans la configuration VM et peuvent être affinées dans la catégorie elle-même et/ou dans l’item du menu de la catégorie. Le nouvel affichage des catégories a conservé les anciennes options de la page d’accueil donc les commerçants peuvent maintenant aussi afficher les produits groupés de la catégorie, par exemple « produits vedettes » ou « top 10 ». L’ancienne page d’accueil VirtueMart ne sera plus développé mais elle fonctionnera toujours pour les mises à jours. Les nouvelles améliorations de l’interface graphique d’administration permettent une meilleure ergonomie en réduisant le nombre de « clics » et en offrant un meilleur aperçu de la boutique. Les catégories chargées en Ajax et le Javascript externalisé dans les bibliothèques améliore la fluidité de navigation dans la partie administration.

Améliorations sous le capot

La nouvelle version inclut beaucoup d’améliorations de code. Le design du système est devenu plus cohérent et suit davantage la stratégie de mise ne cache des objets. Cela signifie que l’on préfère charger un objet entièrement, même si nous avons juste besoin du nom, parce qu’il est probable que nous avons besoin de l’objet complet un peu plus tard de toute façon. Nous avons aussi ajouté des programmes caches pour chaque fonction, et pas seulement celle de recherche de bases de données. En outre, la nouvelle version met le cap sur la comptabilité Wordpress. Par exemple, les options par catégories sont importantes pour WP, parce qu’il n’y a aucune option d’item du menu semblable à ceux utilisés dans Joomla. Le nouveau système de langue utilise en effet toujours l’objet Joomla JLanguage mais le traitement ci-dessus séparé pour que l’on puisse mieux l’utiliser dans WP. Il a aussi l’avantage que l’on peut charger plusieurs langues différentes et leur surcharge dans chacune des langues. Nous en avons besoin par exemple pour des langues dans les emails.

Mise à jour conviviale

Nous avons fait particulièrement attention aux mises à jours. Les mises à jour incluent un mode « legacy ». Dans le cas où un site d’e-commerce utilise un plug-in VirtueMart, il peut y avoir des problèmes si le site est multilingue. Dans ce cas, demandez à votre développeur une version mise à jour (la plupart des développeurs tiers fournissent déjà une version mise à jour). Pour des changements de disposition, nous vous recommandons hautement d'utiliser les nouvelles options d’affichage.

Liste de modification

Routage :

  • load homeid after trying to get the activeMenu
  • routing of category and manufacturer ids in category view
  • Itemid for product links
  • another way in the router to grant that the productmodel is loaded
  • Added new function in router.php which takes care of loading ids or slugs with multilang using the vm config vm_lfbs. This function maybe more enhanced and added to VmModel
  • sef lang keys must not have the same translation!
  • Added previous hidden configuration 'sef_for_cart_links' for SEF links in tab SEF of vm config.

Cache et Optimisations : 

  • Added program cache for currency converter. Maybe moved to database
  • cached getVendorId
  • enhanced link creation in BE product listing, prepared and cached with static variable
  • enhancement for the router and product model getProductParentId uses now usually already loaded and cached data of the getProductSingle function. Also the name of the products are now taken from the cache. Usually products are loaded already anyway.
  • the check if vmdebug should be displayed works now with a static in VmConfig and not with a function. The functions is now executed in loadConfig if needed.
  • function getParentProductcategory in router.php uses now already cached products if available
  • sorting on countries published: fix on hash
  • Added "cache" option for language loader

Unité monétaire :

  • Currency can use now empty Space in format
  • increased size of currency fields, so that we can use now html entities

Améliorations pour des raisons pratiques :

Fréquent :

  • Updated "update xmls" to vm3.0.18
  • missing language keys
  • removed id tag from dropdowns to ensure that chosen can always generate a unique id
  • little fix in calculation, category settings work now also for discounts of rules per bill
  • added deep category search for product links by GJC
  • bulgarian states added by servlet
  • global category settings
  1. Added parameters of category view to the vm category itself. This includes also renaming of some parameters in the vmconfig, updater is provided
  2. Added more global options to the new category parameters reused old vm config options (partly of the homepage settings) as global options for the new category parameters
  3. enhanced the layout for the view global settings in vm config
  4. Adjusted also the newsfeed of the category view to work as the homepage feed.
  5. added "no override" setting to the category layout/template parameters. All additional category/template/layout Parameters use now an empty string as "default" (no override)

Administration : 

  • ajax loading of categories in Administration area.
  • updated links of help file
  • Added config which price should be used, when more than one fits (old selection used always the higher price)
  • added vm config option for legacy layouts
  • function getLayouts in config model checks for empty directories
  • fix for tcpdf font listing, when tcpdf is not installed
  • "debug email" which outputs the emails as message instead of sending them.
  • fixed coupon search (thank you sandomatyas)
  • configuration for the feature to omit already loaded products
  • fix for JCE 2.6.0
  • fix for editor cf, don't compare JDocumentHTML case sensitive, since Joomla changed it to JDocumentHtml
  • added discontinued products
  • added stockhandle on product level
  • config for stockhandle on product level
  • choose between replace, add and remove for product bulk associations
  • more failsafe solution in model product.php for getProductShoppersByStatus in case a userfield is deleted
  • MV were sortable, but did not show the right order in product edit, fixed
  • "gui" fixes for customfield Multivariant. Removed phantom child in case it got deleted and fixed for some workflows a wrongly shown error.
  • fixed rounding of customfield property by adding a new option "use rounding"
  • added that commas are also replaced for desired final price
  • createClone works now with getProductSingle, so that clones are still completely configurable by the parent
  • fixed cloning of products in multilanguage shops
  • fix in vmtable (for vmusers) function check, new registered users got vendorId of the admin creating the user
  • added coupon to revenue (as extra column)
  • fixed report for daily filter, should now work also with correct time offset (r9401)
  • enhanced order listing, more information, combined some columns
  • enhanced order editing, please check the help file for the new possibilities
  • hidden fields also in order edit (by Rupostel)
  • Shipmentmethod in the order list BE (by Alatak)
  • colors for order status for faster BE order list reading (by Alatak)
  • fixed BE ordering of shipment and payment methods
  • fixed small display error while adding ST address in BE user edit
  • also ratings are autopublished (worked already for reviews)
  • BE hover title for image search results

Interface frontale :

  • enhanced fallback of meta data in the category view
  • added config "show_subcat_products"
  • fixed recent products, was missing creating products by returned ids
  • added using $this->isPdf to the cart layout to prevent printing of unnecessary forms
  • cart sets vendorId=0, when all products are removed an in multivendor mode
  • no public error for missing images
  • Added total prices (price per item multiplied by quantity)
  • related products use now normal price display
  • added option for related products to have an add to cart button
  • setProductType for related products
  • Added product img thumb for Ajax Cart
  • removed deprecated layout login.php in user view, is now replaced by sublayout login
  • enhanced js toggling the checkout/confirm button
  • new Handling of session in function emptyCartFromStorageSession, should throw an logged error in case someone has an unpatched joomla
  • added feedback when user registration is forbidden by joomla
  • fixed the problem that the registration mail was always sent regardless the joomla configuration
  • "Shopper group back to default after order finished." fixed http://forum.virtuemart.net/index.php?topic=136077.0 
  • fixed "show more revues" button. 

Langue :

  • Better language system, we load different languages now in different JLanguage instances
  • moved language functions of VmConfig in own class vmLanguage, moved class vmLanguage in own file
  • added new variable $currLangTag, which keeps always the last set language.
  • vmLanguge function setLanguage is now private, setLanguageByTag should be used
  • check in vmtable if language tag is correctly set, else it calls vmLanguage::initialise()
  • added shopFunctionsF::loadOrderLanguages, which loads the language files "shoppers" and "orders" with fallbacks and for the requested extra language
  • added parameter for loadConfig, so that it can be used without initialising vmLanguage (important for use in onAfterInitialise event)
  • added log message, when language was not correctly loaded.
  • added the options for "invoice in user language "
  • function renderMail uses now the default backend language for the messages to the vendor
  • vendor emails of orders are now sent always with the vendor language with fallback to joomla default language
  • fix in router for better BC, loads vmConfig and sets in case the right language, this is need because some plugins load vm before the right language is set by joomla
  • fix for order/invoice/mail shopper language, when the shop language has not english as default language (=joomla default site language)
  • Fixed language for invoices header and footer, need resetting of vmlang by VmConfig::setdbLanguageTag added user language to order, is also interesting for support
  • displayLinkToParent works now with language fallbacks
  • Added cloning and creation of childs to product edit view
  • Cloning products: Fixed doubled prices of cloned product, happened due reupdating the product after the process
  • Cloning products: Fixed missing shoppergroups
  • added language fallback for manufacturer
  • language fallback for manufacturer for routing
  • added fallback for categories in the backend list config model
  • fix for category search with multilanguage fallbacks
  • fix for default ordering in product listing with multilanguage fallbacks
  • fixed ordering for product names in BE list, works also with language fallbacks

Programme d'installation et mise à jour :

  • Updating an old vm enables the legacy layout
  • added installation language, minors for sample_virtuemart.sql
  • added checking for the new order stati, inserted if missing
  • fullinstaller has virtuemart sample data already selected
  • language depended sample data is loaded, when available (with suffix _fr_fr for example)
  • increased max_execution_time and memory_limit in installer and tableupdater
  • loaded vm instance of install script is now using the temp install folder
  • enhanced sample data (more reasonable) 
  • changed some default settings of the updater, so that updaters should not notice any difference

Améliorations des tables :

  • Some more fields from char to varchar
  • added some keys for faster reading

SQL :

  • prevented ambiguous product_mpn
  • payment and shipment model missed i. for ordering
  • Some sql were broken for multivendor using fallback for fallback language. Abstract function planned
  • Replaced all "using" in sql against ON (and that was a lot)
  • fixed getParentlink query in product edit
  • getCategoryRecurse sql is not executed for child_id = 0 anylonger
  • fixed sql getPluginMethods
  • fixed sql in model category function getParentsList when language fallback is needed
  • fixed sql of shipment and payment model function getPayments and getShipments (kind of typo a missing alias after the "as"
  • fixed sql error in customfield.php r9358
  • Added some sql table keys id,ordering
  • small optimisations of sql for using keys better

Programme interne : 

  • config helper and regarding config model for WP
  • renamed stockhandle_discontinued_products to stockhandle_products
  • renamed product_remaining_stock to product_discontinued
  • replaced VmConfig::setErrorReporting by VmConfig::setErrRepDefault
  • Added common function "useSSL", which considers the option in vm and joomla
  • exchanged "round" against "roundInternal" in calculation helper http://forum.virtuemart.net/index.php?topic=135622.msg473786#msg473786 
  • new function getCurrentUrlBy, which creates a link by Request (get,post) by a whitelist of variablenames correct redirect urls for login, etc loading of product images for ajax cart data with parameter now
  • model category function getCategory, added check so that an empty category does not try to load medias
  • moved function getRecentProductIds from shopfunctionsF.php to the product model
  • Added new Function vmConfig::getMemoryLimitBytes, which returns the set memory_limit with Bytes
  • Found the error "scalar", happened when a boolean is cast to object r9374
  • VirtuemartModelConfig function getLayouts, added param to disable the empty option
  • replaced more json_encode against vmJsApi::safe_json_encode
  • Each language uses now its own JLanguage object, makes it a lot easier to render different languages
  • Replaced VmConfig::loadJLang against vmLanguage::loadJLang('com_virtuemart');
  • htmlentities does not use ini_get("default_charset") anylonger, is set to UTF-8
  • new function in vmtable checkTableExists
  • vmpsplugin uses now checkTableExists
  • email function renderMail got seperated in different functions and cleaned up
  • removed nasty bug for 3rd party developes which prevented the update of order items using the function updateStatusForOneOrder (r9400)
  • vmTrace can now log and render the message (before log or render)
  • function getTCPDFFontsList, replaced function glob against RecursiveDirectoryIterator
  • added new field vmlisttable, handy to display item lists of models (maintable)
  • added vRequest::setVar('doVendor', $this->doVendor); to function renderMailLayout of the invoice, used by sublayouts in the mail
  • enhanced function getPluginMethods in vmpsplugin.php
  • Added new getCache function, replaced all JFactory::getCache against VmConfig::getCache
  • parameters of customfields not set in the product edit do not set a default value anylonger, so the value of the customprototype is used
  • userfields are now escaped with htmlspecialchar and not htmlentities anylonger
  • Added missing state="0" for sqls using the joomla extension table. This is important, when someone uninstalled and reinstalled a plugin.
  • function declarePluginParams is only checking by name, not extension_id anylonger and removed the & in the foreach for better compatibility
  • updated vmUserfieldPlugin so that its params work similar as the other vmtable params. Is now also php7 compatible.
  • changed function renderCustomfieldsCart so, that it can display extra data by product and user input data
  • Added vmdebug as echo to add to cart popup
  • added clone $product for the triggers plgVmOnProductDisplayShipment and plgVmOnProductDisplayPayment to prevent that the trigger changes accidently the selected variant of the product

Javascript :

  • Added ajax to browse view for multi variants and generic child variants
  • enhanced ajax for reloading children. The view productdetails must have now the class product-container to work properly with ajax
  • replaced "all" jQuery calls against $, if within jQuery environment to prevent problems with safari
  • changed reserver time of "keepAlive" script. The delivery time of the page must be considered.
  • javascript added boolean setBrowserState to prevent optionally the setting of browser state by ajax
  • removed avfind.js is now added to cvfind.js
  • cvfind js, additionally checks to prevent endless "while loops"
  • switch for loading JHtml::_('behavior.formvalidation'); in vmsjapi and replaced in any files by vmValidator
  • moved js script of mediahandler in own file
  • gathered all media edit scripts to one script "mediahandler.js"
  • gathered product scripts to product.js
  • removed a lot scripts (for products and media) from the vm2admin.js, added "sortable" and "hide price"
  • js for add to cart does not check anylonger for the dom type, so it can be used with spans also
  • vmprices.js setproducttype checks now for the classes product-container, productdetails, vm-product-details-container
  • Added product img thumb for Ajax Cart
  • enhanced language switcher js and new lib for the admin menu
  • BE view orders list und order edit js enhanced 

Typos :

  • typo in config.php created empty language db suffix
  • typo in order model $orderDetails['details'] must be $order['details']

Mises en page :

  • removed asynchron loading of MV script, created random errors on some browsers
  • facebox, disabled asynchronous and defer loading
  • added missing class for ajax to the product module layout "single"
  • Fixed HTML validation issue of cartpos[] input, moved in td. tr elements can accept only td and th elements as childs.
  • Fixed invalid br tag. (r9300)
  • view/category/tmpl/default.php changed if($this->showproducts) against if (!empty($this->products)) the option is considered while loading the products and dont need to be checked there
  • adjusted product_horizon to work with variant ajax reload
  • wrote fallback for ajax for old layouts
  • changed the 0 product group (normal products in the browse view) to "products"
  • update by Stefan Schumacher for the 3 price lists (cart, invoice, orders) removed old tags against inline style (yeh, class comes later)
  • changed a bit css so that add to cart button can be shown as span 

Paiements et expéditions : 

  • Fix for paybox IP problem http://forum.virtuemart.net/index.php?topic=135600.0 
  • little fix for paypal express, removed the possibility to select it as option to prevent errors with ajax
  • fixed selection of paypal (removing of paypal express from the select list, removed it completely) r9384
  • paypal has now optional conditional shipments
  • small fix in Amazon Pay orderreferencenotification.php
  • Amazon Pay removed VMPAYMENT_AMAZON_PAYMENT_NOT_AVAILABLE message, when the method cannot be selected
  • Heidelpay adjustments for php 7 and some minors
  • little fix for authorize.net
  • Standard shipment plugin: Fixed a small issue, that deactivation of "show on productdetail" was not correctly loaded in the settings
  • small fix in weight_countries.php, which prevented a checkout when there was no method for weight_countries.php configured and another shipment plugin used
  • check in weight_countries.php, which prevents that the wrong shipment is autoselected (r9418)
  • Avatax added check for soap

Sécurité : 

  • rewritten getMyOrderDetails, works now whitelisted
  • security enhancement for model userfields by Stan Scholtz (Rupostel)
  • userfields security enhancement by Rupostel double encoded html entities, param changed
  • added hashing of vmver (js and css)
  • Added extra check for isFEmanager if user is actually logged in.
Valérie Isaksen

Valérie Isaksen

http://www.alatak.net

Auteur

Valérie Isaksen a commencé son activité professionnelle en développant des logiciels pour l'Internet en Norvège. En 2004, elle lance sa société de création de sites web Alatak.net et se spécialise dans les sites e-commerce avec Joomla et VirtueMart. Elle participe activement au projet VirtueMart et propose des contributions Open Source.

Impliquée dans la communauté Joomla France pendant plusieurs années, elle est connue sous le pseudo "alatak" sur le forum de Joomla.fr.

Auteure du livre Joomla et VirtueMart: Réussir sa boutique en ligne qui a connu un certain succès en librairie, elle fait partie de l'équipe de développement de VirtueMart entre 2011 et 2014.

Autres articles de cet auteur


Le nom Joomla!® et son logo sont utilisé sous license limitée d'Open Source Matters, le propriétaire mondial de la marque de commerce. Le site VirtueMart.fr n'est pas affilié ni soutenu par Open Source Matters ou le projet Joomla!®.
VirtueMart est une marque déposée par iStraxx UG (haftungsbeschränkt) en Allemagne.