Superbegood31 Posted November 7, 2014 Share Posted November 7, 2014 (edited) Hello,I want to display on the delivery pdf the declination value chosen by the customer.For example:For a product with a declination "Music", the customer chooses the value "4 Seasons."I would like to display on delivery pdf only:Your choice: "The 4 Seasons"Currently, everything is informed of a block (product + declination)Thank you in advance for your help Edited November 7, 2014 by SWITCHBOARD (see edit history) Link to comment Share on other sites More sharing options...
tuk66 Posted November 7, 2014 Share Posted November 7, 2014 It depends on your product names, but the product + attribute combination is always something like: Printed Dress - Color : Orange, Size : S and you can try to split product and attribute by "-" character. Link to comment Share on other sites More sharing options...
Superbegood31 Posted November 7, 2014 Author Share Posted November 7, 2014 Thank you for your returnFor example the name of my product with its variations as it appears on my delivery PDF:PRE-DECROCHE - Texte libre - Langue étrangère : Aucune, Musique : JazzUpIn delivery-slip.tpl I trying{$ order_detail.product_name | strpos: "Musique"}But it return a number out I want all that is before "Musique" is cleared as below Musique : JazzUp Thanks Link to comment Share on other sites More sharing options...
Superbegood31 Posted November 7, 2014 Author Share Posted November 7, 2014 I solved my problem as In delivery-slip.tplI added{assign var = "var" value = $ order_detail.product_name} And the correct display{$ var | substr ($ var | strpos: "Musique")} And the display is ok Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now