# Add hires paths and pxprint.net-IDs to cart items {{vtLoad: templates/pixtacy/resources/functions.php}} {{vtSet: Warenkorb=""}} {{vtRepeat:{Warenkorb:raw} }} {{vtSet: Item="{vtItem}" }} {{vtIf: {vtItem:hires_path} .eq. }} {{vtSet: hires_path="" }} {{vtUse: {vtItem:product} }} {{vtSet: Kennung="{Kennung:raw}"}} {{vtSet: pxprint_id="{pxprint_id:raw}"}} {{vtEndUse}} {{vtIf: {vtGet:Kennung} .eq. *}} {{vtSet: subfolder=""}} {{vtElseIf: {vtGet:Kennung} .neq.}} {{vtSet: subfolder="{vtGet:Kennung}/"}} {{vtEndIf}} {{vtCalc: getFileList( '{vtGlobal:pxtcPathHires}/{vtItem:folder}/{vtGet:subfolder}', '^' . preg_quote( substr( '{vtItem:filename}', 0, strpos( '{vtItem:filename}', '.' ) ) ) . '\..+' ) }} {{vtIf: {vtResult} .neq. -1 }} {{vtRepeat: {vtResult} }} {{vtSet: hires_path="{vtGet:subfolder}{vtItem}"}} {{vtExit}} {{vtEndRepeat}} {{vtEndIf}} {{vtIf: {vtGet:hires_path} .neq. }} {{vtSet: Item[hires_path]="{vtGet:hires_path,raw}"}} {{vtSet: Item[pxprint_id]="{vtGet:pxprint_id,raw}"}} {{vtElse}} {{vtSet: MissingPaths[]="{vtItem:folder}/{vtGet:subfolder}{vtItem:filename}"}} {{vtEndIf}} {{vtEndIf}} {{vtSet: Warenkorb[]="{vtGet:Item}"}} {{vtEndRepeat}} {{vtDo: -act="update", -obj="{vtID}", Warenkorb="{vtGet:Warenkorb}"}} {{vtIf: {vtGetValue:-met} .eq. add_hires_paths }} {{vtRedirect}} {{vtEndIf}}