Jump to content

Trier Les Produits Dans Bon De Livraison


Recommended Posts

Bonjour,

Je souhaite trier les produits du bon de livraison par ordre alphabétique (product_name).

Je n'ai rien trouvé dans delivery-slip.product-tab.tpl et rien dans les forums...

 

Avez-vous une solution à me proposer en PS 1.6 ?

Merci pour votre aide.

Link to comment
Share on other sites

  • 3 years later...

tuk66 merci pour le chemin d'accès.

Maintenant que je suis ici:

$order_details = $this->order_invoice->getProducts();
        if (Configuration::get('PS_PDF_IMG_DELIVERY')) {
            foreach ($order_details as &$order_detail) {
                if ($order_detail['image'] != null) {
                    $name = 'product_mini_'.(int)$order_detail['product_id'].(isset($order_detail['product_attribute_id']) ? '_'.(int)$order_detail['product_attribute_id'] : '').'.jpg';
                    $path = _PS_PROD_IMG_DIR_.$order_detail['image']->getExistingImgPath().'.jpg';

                    $order_detail['image_tag'] = preg_replace(
                        '/\.*'.preg_quote(__PS_BASE_URI__, '/').'/',
                        _PS_ROOT_DIR_.DIRECTORY_SEPARATOR,
                        ImageManager::thumbnail($path, $name, 45, 'jpg', false),
                        1
                    );

                    if (file_exists(_PS_TMP_IMG_DIR_.$name)) {
                        $order_detail['image_size'] = getimagesize(_PS_TMP_IMG_DIR_.$name);
                    } else {
                        $order_detail['image_size'] = false;
                    }
                }
            }

... que dois-je faire pour que les produits soient classés par Catégorie sur le PDF ?

Merci !!!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...